#include <bits/stdc++.h>
using namespace std;
const int N = 400050;
int cntA[N], cntB[N], A[N], B[N], sa[N], rk[N], tsa[N], ht[N], lens, lent, n,
    Log[N], g[N][20], P, f[N][50], ans;
char s[N];
void SA() {
  for (int i = 1; i <= n; i++) cntA[s[i]]++;
  for (int i = 1; i <= 256; i++) cntA[i] += cntA[i - 1];
  for (int i = n; i; i--) sa[cntA[s[i]]--] = i;
  rk[sa[1]] = 1;
  for (int i = 2; i <= n; i++)
    rk[sa[i]] = rk[sa[i - 1]] + (s[sa[i]] != s[sa[i - 1]]);
  for (int l = 1; rk[sa[n]] < n; l <<= 1) {
    memset(cntA, 0, sizeof(cntA));
    memset(cntB, 0, sizeof(cntB));
    for (int i = 1; i <= n; i++)
      cntA[A[i] = rk[i]]++, cntB[B[i] = (i + l <= n ? rk[i + l] : 0)]++;
    for (int i = 1; i <= n; i++) cntA[i] += cntA[i - 1], cntB[i] += cntB[i - 1];
    for (int i = n; i; i--) tsa[cntB[B[i]]--] = i;
    for (int i = n; i; i--) sa[cntA[A[tsa[i]]]--] = tsa[i];
    rk[sa[1]] = 1;
    for (int i = 2; i <= n; i++)
      rk[sa[i]] = rk[sa[i - 1]] +
                  (A[sa[i]] != A[sa[i - 1]] || B[sa[i]] != B[sa[i - 1]]);
  }
  for (int i = 1, j = 0; i <= n; i++) {
    j = j ? j - 1 : 0;
    while (s[i + j] == s[sa[rk[i] - 1] + j]) j++;
    ht[rk[i]] = j;
  }
  for (int i = 1; i <= n; i++) g[i][0] = ht[i], Log[i] = Log[i >> 1] + 1;
  for (int j = 1; j <= 19; j++) {
    for (int i = 1; i <= n; i++) {
      g[i][j] = min(g[i][j - 1], g[i + (1 << (j - 1))][j - 1]);
    }
  }
}
int lcp(int x, int y) {
  if (x == y) return n - x + 1;
  x = rk[x], y = rk[y];
  if (x > y) swap(x, y);
  x++;
  int t = Log[y - x + 1];
  return min(g[x][t], g[y - (1 << t) + 1][t]);
}
int main() {
  scanf("%d%s", &lens, s + 1);
  scanf("%d%s", &lent, s + lens + 2);
  Log[0] = -1, s[lens + 1] = '#', n = lens + lent + 1, SA();
  scanf("%d", &P);
  for (int i = 1; i <= lens + 1; i++) {
    for (int j = 0; j <= P; j++) {
      f[i + 1][j] = max(f[i + 1][j], f[i][j]);
      if (f[i][j] == lent) {
        puts("YES");
        return 0;
      }
      int LCP = lcp(i, lens + 1 + f[i - 1][j] + 1);
      f[i + LCP][j + 1] = max(f[i + LCP][j + 1], f[i][j] + LCP);
    }
  }
  puts("NO");
}
