#include <bits/stdc++.h>
using namespace std;
void getint(int &v) {
  char ch, fu = 0;
  for (ch = '*'; (ch < '0' || ch > '9') && ch != '-'; ch = getchar())
    ;
  if (ch == '-') fu = 1, ch = getchar();
  for (v = 0; ch >= '0' && ch <= '9'; ch = getchar()) v = v * 10 + ch - '0';
  if (fu) v = -v;
}
const int INF = 1e9 + 10;
bool ans;
int n, m, N, M, t[500010], sa[500010], f[100010][111], rk[500010], h[500010],
    st[200010][20], g[500010], tt[500010], x;
char s[500010], a[500010], b[500010];
void da() {
  n = N + M;
  m = 26;
  for (int i = 1; i <= m; ++i) t[i] = 0;
  for (int i = 1; i <= n; ++i) t[s[i] - 'a' + 1]++;
  for (int i = 1; i <= m; ++i) t[i] += t[i - 1];
  for (int i = 1; i <= n; ++i) sa[t[s[i] - 'a' + 1]--] = i;
  for (int i = 1; i <= n; ++i)
    rk[sa[i]] = rk[sa[i - 1]] + (s[sa[i]] != s[sa[i - 1]]);
  for (int j = 1; j < n; j <<= 1) {
    int p = 0;
    for (int i = n - j + 1; i <= n; ++i) tt[++p] = i;
    for (int i = 1; i <= n; ++i)
      if (sa[i] > j) tt[++p] = sa[i] - j;
    for (int i = 1; i <= n; ++i) t[i] = 0;
    for (int i = 1; i <= n; ++i) t[rk[i]]++;
    for (int i = 1; i <= n; ++i) t[i] += t[i - 1];
    for (int i = n; i >= 1; --i) sa[t[rk[tt[i]]]--] = tt[i];
    for (int i = 1; i <= n; ++i) {
      int A = sa[i - 1], B = sa[i];
      tt[B] = tt[A] + (rk[A] != rk[B] || rk[A + j] != rk[B + j]);
    }
    for (int i = 1; i <= n; ++i) rk[i] = tt[i];
  }
}
void ht() {
  for (int i = 1; i <= n; ++i) {
    int A = rk[i], B = rk[i - 1], p = sa[rk[i] - 1];
    int t = max(0, h[B] - 1);
    while (s[i + t] == s[p + t]) ++t;
    h[A] = t;
  }
}
void ST_init() {
  for (int i = 1; i <= n; ++i) st[i][0] = h[i];
  for (int j = 1; j <= 18; ++j)
    for (int i = 1; i <= n; ++i)
      st[i][j] = (i + (1 << j - 1) <= n)
                     ? min(st[i][j - 1], st[i + (1 << j - 1)][j - 1])
                     : st[i][j - 1];
}
int ST_get(int x, int y) {
  int t = log2(y - x + 1);
  return min(st[x][t], st[y - (1 << t) + 1][t]);
}
int lcp(int x, int y) {
  int A = rk[x], B = rk[y];
  if (A > B) swap(A, B);
  return ST_get(A + 1, B);
}
int get(int x, int y) {
  int t = lcp(x, N + y);
  t = min(t, N - x + 1);
  t = min(t, M - y + 1);
  return t;
}
int main() {
  scanf("%d%s%d%s%d", &N, a + 1, &M, b + 1, &x);
  for (int i = 1; i <= N; ++i) s[i] = a[i];
  for (int i = 1; i <= M; ++i) s[N + i] = b[i];
  da();
  ht();
  ST_init();
  for (int i = 0; i <= N; ++i)
    for (int j = 0; j <= x; ++j) f[i][j] = -INF;
  f[0][0] = 0;
  for (int i = 0; i <= N - 1; ++i)
    for (int j = 0; j <= x; ++j)
      if (f[i][j] >= 0) {
        f[i + 1][j] = max(f[i + 1][j], f[i][j]);
        if (f[i][j] < M && get(i + 1, f[i][j] + 1))
          f[i + get(i + 1, f[i][j] + 1)][j + 1] =
              max(f[i + get(i + 1, f[i][j] + 1)][j + 1],
                  f[i][j] + get(i + 1, f[i][j] + 1));
      }
  for (int i = 0; i <= x; ++i)
    if (f[N][i] >= M) ans = 1;
  puts(ans ? "YES" : "NO");
  return 0;
}
