#include <bits/stdc++.h>
using namespace std;
const int maxm = 1e5 + 5;
const int p = 131;
const int mod = 1e9 + 7;
int base[maxm];
int h1[maxm], h2[maxm];
int d[maxm][33];
char s[maxm];
char t[maxm];
int n, m, x;
void init() {
  base[0] = 1;
  for (int i = 1; i < maxm; i++) base[i] = 1ll * base[i - 1] * p % mod;
  for (int i = 1; i <= n; i++) {
    h1[i] = (1ll * h1[i - 1] * p + s[i]) % mod;
  }
  for (int i = 1; i <= m; i++) {
    h2[i] = (1ll * h2[i - 1] * p + t[i]) % mod;
  }
}
int get1(int l, int r) {
  return (h1[r] - 1ll * base[r - l + 1] * h1[l - 1] % mod + mod) % mod;
}
int get2(int l, int r) {
  return (h2[r] - 1ll * base[r - l + 1] * h2[l - 1] % mod + mod) % mod;
}
int lcp(int S, int T) {
  int ans = 0;
  int l = 1, r = min(n - S + 1, m - T + 1);
  while (l <= r) {
    int mid = (l + r) / 2;
    int ha1 = get1(S, S + mid - 1);
    int ha2 = get2(T, T + mid - 1);
    if (ha1 == ha2)
      ans = mid, l = mid + 1;
    else
      r = mid - 1;
  }
  return ans;
}
signed main() {
  scanf("%d", &n);
  scanf("%s", s + 1);
  scanf("%d", &m);
  scanf("%s", t + 1);
  scanf("%d", &x);
  init();
  for (int i = 0; i < n; i++) {
    for (int j = 0; j <= x && j <= i; j++) {
      d[i + 1][j] = max(d[i + 1][j], d[i][j]);
      if (d[i][j] + 1 <= m && j + 1 <= x) {
        int lc = lcp(i + 1, d[i][j] + 1);
        if (lc) d[i + lc][j + 1] = max(d[i + lc][j + 1], d[i][j] + lc);
      }
    }
  }
  int ans = 0;
  for (int i = 1; i <= x; i++) {
    ans = max(ans, d[n][i]);
  }
  if (ans == m) {
    puts("YES");
  } else {
    puts("NO");
  }
  return 0;
}
