#include <bits/stdc++.h>
using namespace std;
int read() {
  int res = 0, f = 1;
  char c = getchar();
  while (c < '0' || c > '9') f = (c == '-') ? -1 : 1, c = getchar();
  while ('0' <= c && c <= '9') res = res * 10 + c - '0', c = getchar();
  return res * f;
}
long long power(long long x, long long y) {
  long long res = 1;
  while (y) {
    if (y & 1) res = res * x % 1000000007;
    x = x * x % 1000000007;
    y >>= 1;
  }
  return res;
}
char s[100009], t[100009];
long long hss[100009], hst[100009], pw[100009];
int f[100009][40];
long long hsh(long long a, long long b, long long c) {
  return (a - b * pw[c] % 1000000007 + 1000000007) % 1000000007;
}
int main() {
  int n = read();
  scanf("%s", s + 1);
  int m = read();
  scanf("%s", t + 1);
  int x = read();
  for (int i = 1; i <= n; i++)
    hss[i] = (hss[i - 1] * 131 % 1000000007 + s[i] - 'a' + 1) % 1000000007;
  for (int i = 1; i <= m; i++)
    hst[i] = (hst[i - 1] * 131 % 1000000007 + t[i] - 'a' + 1) % 1000000007;
  pw[0] = 1;
  for (int i = 1; i <= n; i++) pw[i] = pw[i - 1] * 131 % 1000000007;
  for (int i = 0; i <= n; i++)
    for (int j = 0; j <= x; j++) {
      f[i + 1][j] = max(f[i + 1][j], f[i][j]);
      int l = 1, r = min(n - i, m - f[i][j]), ans = 0;
      while (l <= r) {
        int mid = l + r >> 1;
        if (hsh(hst[f[i][j] + mid], hst[f[i][j]], mid) ==
            hsh(hss[i + mid], hss[i], mid))
          ans = mid, l = mid + 1;
        else
          r = mid - 1;
      }
      if (ans) f[i + ans][j + 1] = max(f[i + ans][j + 1], f[i][j] + ans);
    }
  for (int i = 1; i <= x; i++)
    if (f[n][i] == m) {
      puts("YES");
      return 0;
    }
  puts("NO");
  return 0;
}
