#include <bits/stdc++.h>
using namespace std;
const int N = 100005, M = 31, mo[2] = {998244353, 1004535809}, INF = 1e9;
int n, m, K, h1[2][N], h2[2][N], p[2][N], f[N][M];
char s[N], t[N];
bool Same(int x, int y, int l) {
  for (int i = 0; i < 2; i++) {
    if ((mo[i] +
         (h1[i][x + l - 1] - (long long)h1[i][x - 1] * p[i][l]) % mo[i]) %
            mo[i] !=
        (mo[i] +
         (h2[i][y + l - 1] - (long long)h2[i][y - 1] * p[i][l]) % mo[i]) %
            mo[i])
      return 0;
  }
  return 1;
}
int getlcp(int x, int y) {
  int l, r, mid;
  for (l = 0, r = ((n - x + 1) < (m - y + 1) ? (n - x + 1) : (m - y + 1)),
      mid = r >> 1;
       l < r; mid = l + r >> 1)
    if (!Same(x, y, mid))
      r = mid;
    else
      l = mid + 1;
  if (!Same(x, y, l)) l--;
  return l;
}
int main() {
  scanf("%d%s%d%s%d", &n, s + 1, &m, t + 1, &K);
  for (int j = 0; j < 2; j++) {
    p[j][0] = 1;
    for (int i = 1; i < N; i++) p[j][i] = (long long)p[j][i - 1] * 26 % mo[j];
    for (int i = 1; i <= n; i++)
      h1[j][i] = ((long long)h1[j][i - 1] * 26 + s[i] - 'a') % mo[j];
    for (int i = 1; i <= m; i++)
      h2[j][i] = ((long long)h2[j][i - 1] * 26 + t[i] - 'a') % mo[j];
  }
  f[0][0] = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < K; j++)
      if (f[i][j] < m) {
        int k = f[i][j], lcp = getlcp(i + 1, k + 1);
        f[i + 1][j] = ((f[i + 1][j]) > (k) ? (f[i + 1][j]) : (k));
        if (lcp > 0)
          f[i + lcp][j + 1] =
              ((f[i + lcp][j + 1]) > (k + lcp) ? (f[i + lcp][j + 1])
                                               : (k + lcp));
      }
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= K; j++)
      if (f[i][j] == m) {
        printf("YES\n");
        return 0;
      }
  printf("NO\n");
  return 0;
}
