#include <bits/stdc++.h>
using namespace std;
const int inf = (int)1e9;
const long long linf = (long long)1e18;
const double eps = (double)1e-8;
const int mod = (int)1e9 + 7;
const int maxn = (int)1e5 + 5;
const int MX = (int)1e5;
const int PRIME = 31;
string s, t;
int n, m, first;
long long hs[maxn], ht[maxn], st[maxn];
int d[maxn][33];
int subs(int l, int r) {
  return 1ll * (hs[r] - hs[l - 1] + mod) % mod * st[max(n, m) - r] % mod;
}
int subt(int l, int r) {
  return 1ll * (ht[r] - ht[l - 1] + mod) % mod * st[max(n, m) - r] % mod;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  cin >> s;
  s = "_" + s;
  cin >> m;
  cin >> t;
  t = "_" + t;
  cin >> first;
  st[0] = 1;
  for (int i = (1); i <= (int)(MX); ++i) {
    st[i] = 1ll * st[i - 1] * PRIME % mod;
  }
  hs[0] = 0;
  for (int i = (1); i <= (int)(n); ++i) {
    hs[i] = (hs[i - 1] + st[i - 1] * (s[i] - 'a' + 1)) % mod;
  }
  ht[0] = 0;
  for (int i = (1); i <= (int)(m); ++i) {
    ht[i] = (ht[i - 1] + st[i - 1] * (t[i] - 'a' + 1)) % mod;
  }
  memset((d), 0, sizeof(d));
  for (int i = (0); i <= (int)(n - 1); ++i) {
    for (int j = (0); j <= (int)(first); ++j) {
      d[i + 1][j] = max(d[i + 1][j], d[i][j]);
      if (j == first) continue;
      int l = 0;
      int r = min(n - i, m - d[i][j]);
      while (l < r) {
        int mid = (l + r + 1) / 2;
        if (subs(i + 1, i + mid) == subt(d[i][j] + 1, d[i][j] + mid))
          l = mid;
        else
          r = mid - 1;
      }
      d[i + l][j + 1] = max(d[i + l][j + 1], d[i][j] + l);
    }
  }
  for (int i = (1); i <= (int)(first); ++i) {
    if (d[n][i] == m) {
      cout << "YES"
           << "\n";
      return 0;
    }
  }
  cout << "NO"
       << "\n";
  return 0;
}
