#include <bits/stdc++.h>
long long xx1[100000 + 1], xx2[100000 + 1], ss1[100000], ss2[100000],
    tt1[100000], tt2[100000];
int dp[100000 + 1][30 + 1];
char ss[100000 + 1], tt[100000 + 1];
int n, m;
void init() {
  int i, j;
  xx1[0] = xx2[0] = 1;
  for (i = 1; i < n; i++) {
    xx1[i] = (xx1[i - 1] * 29LL) % 1000000007LL;
    xx2[i] = (xx2[i - 1] * 31LL) % 1000000009LL;
  }
  ss1[0] = ss2[0] = ss[0] - 'a';
  for (i = 1; i < n; i++) {
    int s = ss[i] - 'a';
    ss1[i] = (ss1[i - 1] * 29LL + s) % 1000000007LL;
    ss2[i] = (ss2[i - 1] * 31LL + s) % 1000000009LL;
  }
  tt1[0] = tt2[0] = tt[0] - 'a';
  for (j = 1; j < m; j++) {
    int t = tt[j] - 'a';
    tt1[j] = (tt1[j - 1] * 29LL + t) % 1000000007LL;
    tt2[j] = (tt2[j - 1] * 31LL + t) % 1000000009LL;
  }
}
long long hash(long long *pp, long long x, long long m_, int i, int l) {
  return i == 0 ? pp[i + l - 1]
                : (pp[i + l - 1] - pp[i - 1] * x % m_ + m_) % m_;
}
int lcp(int i, int j) {
  int lower = 0, upper = (n - i < m - j ? n - i : m - j) + 1;
  while (upper - lower > 1) {
    int l = (lower + upper) / 2;
    if (hash(ss1, xx1[l], 1000000007LL, i, l) ==
            hash(tt1, xx1[l], 1000000007LL, j, l) &&
        hash(ss2, xx2[l], 1000000009LL, i, l) ==
            hash(tt2, xx2[l], 1000000009LL, j, l))
      lower = l;
    else
      upper = l;
  }
  return lower;
}
int main() {
  int max, i, j, k, l;
  scanf("%d", &n);
  scanf("%s", ss);
  scanf("%d", &m);
  scanf("%s", tt);
  scanf("%d", &max);
  if (max > m) max = m;
  init();
  for (i = 0; i <= n; i++)
    for (k = 0; k <= max; k++) dp[i][k] = -1;
  dp[0][0] = 0;
  for (i = 0; i <= n; i++)
    for (k = 0; k <= max; k++)
      if ((j = dp[i][k]) >= 0) {
        if (i < n && dp[i + 1][k] < j) dp[i + 1][k] = j;
        if (k < max) {
          l = lcp(i, j);
          if (dp[i + l][k + 1] < j + l) dp[i + l][k + 1] = j + l;
        }
      }
  printf(dp[n][max] == m ? "YES\n" : "NO\n");
  return 0;
}
