#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 10;
const int md = 107;
const int md2 = 37;
const int m1 = 1e9 + 7;
const int m2 = 434992819;
int f[maxn][31], n, m, flag, k;
long long h[3][maxn], h2[3][maxn], b2[maxn], bow[maxn];
char s1[maxn], s2[maxn];
int gethash(int p, int l, int r) {
  return (h[p][r] - h[p][l - 1] * bow[r - l + 1] % m1 + m1) % m1;
}
int gethash2(int p, int l, int r) {
  return (h2[p][r] - h2[p][l - 1] * b2[r - l + 1] % m2 + m2) % m2;
}
int get(int x, int y) {
  int res = 0, l = 1, r = min(n - x + 1, m - y + 1);
  while (l <= r) {
    int mid = (l + r) >> 1;
    if (gethash(1, x, x + mid - 1) == gethash(2, y, y + mid - 1) &&
        gethash2(1, x, x + mid - 1) == gethash2(2, y, y + mid - 1)) {
      res = mid;
      l = mid + 1;
    } else
      r = mid - 1;
  }
  return res;
}
int main() {
  scanf("%d", &n);
  scanf("%s", s1 + 1);
  scanf("%d", &m);
  scanf("%s", s2 + 1);
  scanf("%d", &k);
  bow[0] = 1;
  b2[0] = 1;
  for (int i = 1; i <= n; i++) bow[i] = bow[i - 1] * md % m1;
  for (int i = 1; i <= n; i++) b2[i] = b2[i - 1] * md2 % m2;
  for (int i = 1; i <= n; i++)
    h[1][i] = ((long long)h[1][i - 1] * md % m1 + s1[i] - 'a' + 1 + m1) % m1;
  for (int i = 1; i <= n; i++)
    h[2][i] = ((long long)h[2][i - 1] * md % m1 + s2[i] - 'a' + 1 + m1) % m1;
  for (int i = 1; i <= n; i++)
    h2[1][i] = ((long long)h2[1][i - 1] * md2 % m2 + s1[i] - 'a' + 1 + m2) % m2;
  for (int i = 1; i <= n; i++)
    h2[2][i] = ((long long)h2[2][i - 1] * md2 % m2 + s2[i] - 'a' + 1 + m2) % m2;
  for (int i = 0; i < n; i++)
    for (int j = 0; j <= k; j++) {
      f[i + 1][j] = max(f[i + 1][j], f[i][j]);
      int pos = get(i + 1, f[i][j] + 1);
      if (j < k) f[i + pos][j + 1] = max(f[i + pos][j + 1], f[i][j] + pos);
    }
  for (int i = 1; i <= k; i++)
    if (f[n][i] == m) flag = 1;
  if (flag)
    puts("YES");
  else
    puts("NO");
  return 0;
}
