#include <bits/stdc++.h>
using namespace std;
int f[200005][31], Log[200005];
char s[200005], t[200005], S[200005];
int n, m, X;
int sa[200005], nue[200005], ra[200005], sum[200005], height[200005],
    st[200005][21];
void gmax(int &x, int y) {
  if (y > x) x = y;
}
bool cmp(int x, int y) { return S[x] < S[y]; }
void houzhuishuzu(int n) {
  Log[1] = 0;
  for (int i = 2; i <= n; i++) Log[i] = Log[i / 2] + 1;
  for (int i = 1; i <= n; i++) sa[i] = i;
  sort(sa + 1, sa + n + 1, cmp);
  ra[sa[1]] = 1;
  for (int i = 2; i <= n; i++) {
    if (S[sa[i]] != S[sa[i - 1]])
      ra[sa[i]] = ra[sa[i - 1]] + 1;
    else
      ra[sa[i]] = ra[sa[i - 1]];
  }
  for (int k = 1; k < n; k <<= 1) {
    int tot = 0;
    for (int i = n - k + 1; i <= n; i++) nue[++tot] = i;
    for (int i = 1; i <= n; i++) {
      sum[i] = 0;
      if (sa[i] > k) nue[++tot] = sa[i] - k;
    }
    for (int i = 1; i <= n; i++) sum[ra[i]]++;
    for (int i = 1; i <= n; i++) sum[i] += sum[i - 1];
    for (int i = n; i >= 1; i--) {
      sa[sum[ra[nue[i]]]--] = nue[i];
    }
    swap(ra, nue);
    ra[sa[1]] = 1;
    for (int i = 2; i <= n; i++) {
      if (nue[sa[i]] != nue[sa[i - 1]] || (nue[sa[i - 1]] + k > n) ||
          (nue[sa[i] + k] != nue[sa[i - 1] + k])) {
        ra[sa[i]] = ra[sa[i - 1]] + 1;
      } else {
        ra[sa[i]] = ra[sa[i - 1]];
      }
    }
  }
  int h = 0;
  for (int i = 1; i <= n; i++) {
    if (ra[i] == n) continue;
    if (h) h--;
    int j = sa[ra[i] + 1];
    while (i + h <= n && j + h <= n && S[i + h] == S[j + h]) h++;
    height[ra[i]] = h;
  }
  for (int i = 1; i < n; i++) st[i][0] = height[i];
  for (int j = 1; j <= 20; j++) {
    for (int i = 1; i <= n; i++) {
      st[i][j] = st[i][j - 1];
      if (i + (1 << (j - 1)) <= n) {
        st[i][j] = min(st[i][j], st[i + (1 << (j - 1))][j - 1]);
      }
    }
  }
}
int next(int x, int y) {
  x = ra[x], y = ra[y + n + 1];
  if (x > y) swap(x, y);
  int t = Log[y - x];
  return min(st[x][t], st[y - (1 << t)][t]);
}
int main() {
  scanf("%d", &n);
  scanf("%s", s + 1);
  scanf("%d", &m);
  scanf("%s", t + 1);
  scanf("%d", &X);
  int tot = 0;
  for (int i = 1; i <= n; i++) S[++tot] = s[i];
  S[++tot] = '*';
  for (int i = 1; i <= m; i++) S[++tot] = t[i];
  houzhuishuzu(tot);
  for (int x = 0; x < X; x++) {
    for (int i = 0; i < n; i++) {
      gmax(f[i + 1][x], f[i][x]);
      int t = next(i + 1, f[i][x] + 1);
      if (t) gmax(f[i + t][x + 1], f[i][x] + t);
    }
  }
  for (int i = 0; i <= n; i++) {
    for (int x = 0; x <= X; x++) {
      if (f[i][x] == m) {
        puts("YES");
        return 0;
      }
    }
  }
  puts("NO");
  return 0;
}
