#include <bits/stdc++.h>
using namespace std;
const int SEED1 = 3147, SEED2 = 2333, MOD = 1000000009;
const int MAXN = 100010, MAXC = 35;
unsigned long long s1[MAXN], t1[MAXN], pw1[MAXN];
unsigned long long s2[MAXN], t2[MAXN], pw2[MAXN];
char s[MAXN], t[MAXN];
int n, m, c;
void init() {
  scanf("%d%s%d%s%d", &n, s + 1, &m, t + 1, &c);
  pw1[0] = pw2[0] = 1;
  for (int i = 1; i <= n; ++i) {
    pw1[i] = pw1[i - 1] * SEED1 % MOD;
    pw2[i] = pw2[i - 1] * SEED2;
  }
  s1[0] = s2[0] = t1[0] = t2[0] = 0;
  for (int i = 1; i <= n; ++i) {
    int ch = s[i] - 'a';
    s1[i] = (s1[i - 1] * SEED1 + ch) % MOD;
    s2[i] = s2[i - 1] * SEED2 + ch;
  }
  for (int i = 1; i <= m; ++i) {
    int ch = t[i] - 'a';
    t1[i] = (t1[i - 1] * SEED1 + ch) % MOD;
    t2[i] = t2[i - 1] * SEED2 + ch;
  }
}
inline pair<unsigned long long, unsigned long long> get_s(int l, int r) {
  unsigned long long f1 = s1[r] + (MOD - s1[l - 1] * pw1[r - l + 1] % MOD);
  unsigned long long f2 = s2[r] - s2[l - 1] * pw2[r - l + 1];
  return make_pair(f1 % MOD, f2);
}
inline pair<unsigned long long, unsigned long long> get_t(int l, int r) {
  unsigned long long f1 = t1[r] + (MOD - t1[l - 1] * pw1[r - l + 1] % MOD);
  unsigned long long f2 = t2[r] - t2[l - 1] * pw2[r - l + 1];
  return make_pair(f1 % MOD, f2);
}
inline int lcp(int u, int v) {
  int l = 0, r = min(n - u, m - v), mid;
  while (mid = (l + r) >> 1, l <= r)
    if (get_s(u, u + mid) == get_t(v, v + mid))
      l = mid + 1;
    else
      r = mid - 1;
  return r + 1;
}
int f[MAXN][MAXC];
inline void updMax(int &x, int y) {
  if (x < y) x = y;
}
void dp() {
  memset(f, -1, sizeof(f)), f[0][0] = 0;
  for (int i = 0; i < n; ++i)
    for (int j = 0; j <= c; ++j) {
      if (f[i][j] == -1) continue;
      updMax(f[i + 1][j], f[i][j]);
      int len = lcp(i + 1, f[i][j] + 1);
      if (len > 0) updMax(f[i + len][j + 1], f[i][j] + len);
    }
  bool mark = false;
  for (int i = 1; i <= c; ++i)
    if (f[n][i] == m) mark = true;
  puts(mark ? "YES" : "NO");
}
int main() {
  init();
  dp();
  return 0;
}
