#include <bits/stdc++.h>
using namespace std;
const int N = 100100, L = 20;
int n, m, x, rk[L][N + N], lst[N + N];
char s[N + N];
pair<pair<int, int>, int> v[N + N];
int lcp(int p, int q) {
  int len = 0;
  for (int j = L - 1, b = 1 << j; j >= 0; j--, b >>= 1)
    if (rk[j][p] == rk[j][q] and p + b - 1 <= lst[p] and q + b - 1 <= lst[q])
      len += b, p += b, q += b;
  return len;
}
int dp[31][N];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> 1 + s;
  cin >> m >> 1 + s + n >> x;
  for (int i = 1; i <= n + m; i++)
    if (i <= n)
      lst[i] = n;
    else
      lst[i] = n + m;
  for (int i = 1; i <= n + m; i++) rk[0][i] = s[i] - 'a' + 1;
  for (int j = 1, b = 1; b <= n; b <<= 1, j++) {
    for (int i = 1; i <= n + m; i++)
      v[i] = {{rk[j - 1][i], (i + b <= lst[i] ? rk[j - 1][i + b] : 0)}, i};
    sort(v + 1, v + 1 + n + m);
    for (int lx = 1, rnk = 1; lx <= n + m; rnk++) {
      int rx = lx;
      for (; rx <= n + m and v[lx].first == v[rx].first; rx++)
        rk[j][v[rx].second] = rnk;
      lx = rx;
    }
  }
  memset(dp, 0, sizeof dp);
  for (int j = 0; j <= x; j++) {
    for (int i = 0; i < n; i++) {
      int sol = dp[j][i];
      dp[j][i + 1] = max(dp[j][i + 1], sol);
      int LCP = lcp(i + 1, n + sol + 1);
      dp[j + 1][i + LCP] = max(dp[j + 1][i + LCP], sol + LCP);
    }
  }
  for (int j = 1; j <= x; j++)
    if (dp[j][n] == m) {
      cout << "YES" << '\n';
      return 0;
    }
  cout << "NO" << '\n';
  return 0;
}
