#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5, base = 26, mod = 1e9 + 7;
long long n, m, x, hashs[N], hasht[N], pow26[N], dp[N][35];
string s, t;
bool ok = 0;
void input() {
  cin >> n >> s >> m >> t >> x;
  s = '*' + s;
  t = '*' + t;
  pow26[0] = 1;
  for (long long i = 1; i < N; ++i) pow26[i] = (pow26[i - 1] * base) % mod;
  for (long long i = 1; i <= n; ++i)
    hashs[i] = (hashs[i - 1] * base + s[i] - 'a') % mod;
  for (long long i = 1; i <= m; ++i)
    hasht[i] = (hasht[i - 1] * base + t[i] - 'a') % mod;
}
long long takehashs(long long _i, long long _j) {
  return ((hashs[_j] - hashs[_i - 1] * pow26[_j - _i + 1]) % mod + mod) % mod;
}
long long takehasht(long long _i, long long _j) {
  return ((hasht[_j] - hasht[_i - 1] * pow26[_j - _i + 1]) % mod + mod) % mod;
}
long long get(long long stas, long long stat) {
  long long l = stas, r = stas + min(m - stat, n - stas);
  while (l < r) {
    long long mid = (l + r + 1) >> 1;
    if (takehashs(stas + 1, mid) == takehasht(stat + 1, stat + mid - stas))
      l = mid;
    else
      r = mid - 1;
  }
  return l;
}
void process() {
  for (long long i = 0; i <= n; ++i) {
    for (long long j = 0; j <= x; ++j) {
      dp[i + 1][j] = max(dp[i + 1][j], dp[i][j]);
      dp[i][j + 1] = max(dp[i][j + 1], dp[i][j]);
      long long rem = get(i, dp[i][j]);
      dp[rem][j + 1] = max(dp[rem][j + 1], dp[i][j] + rem - i);
    }
  }
  if (dp[n][x] == m)
    cout << "YES";
  else
    cout << "NO";
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  input();
  process();
  return 0;
}
