#include <bits/stdc++.h>
using namespace std;
const int MOD = 998244353;
const int seed = 233233;
const int maxn = 100009;
const int maxm = 35;
int f[maxn][maxm], power[maxn], hashS[maxn], hashT[maxn];
char s[maxn], t[maxn];
int n, m, x, l, ans;
void init() {
  power[0] = 1;
  for (int i = 1; i < maxn; i++) power[i] = 1LL * power[i - 1] * seed % MOD;
  for (int i = 1; i <= n; i++)
    hashS[i] = (1LL * hashS[i - 1] * seed + s[i]) % MOD;
  for (int i = 1; i <= m; i++)
    hashT[i] = (1LL * hashT[i - 1] * seed + t[i]) % MOD;
}
int calc(int hash[], int l, int r) {
  return ((hash[r] - 1LL * hash[l] * power[r - l]) % MOD + MOD) % MOD;
}
int LCP(int a, int b) {
  int l = 0, r = min(n - a, m - b), mid;
  while (l < r) {
    mid = (l + r + 1) >> 1;
    if (calc(hashS, a, a + mid) == calc(hashT, b, b + mid))
      l = mid;
    else
      r = mid - 1;
  }
  return l;
}
int main() {
  scanf("%d%s%d%s%d", &n, s + 1, &m, t + 1, &x);
  init();
  for (int i = 0; i <= n - 1; i++)
    for (int j = 0; j <= x; j++) {
      l = LCP(i, f[i][j]);
      f[i + 1][j] = max(f[i + 1][j], f[i][j]);
      f[i + l][j + 1] = max(f[i + l][j + 1], f[i][j] + l);
    }
  while (x) ans |= (f[n][x--] == m);
  puts(ans ? "YES" : "NO");
  return 0;
}
