#include <bits/stdc++.h>
using namespace std;
long long mod[3] = {1000000007, 101289, 24022015};
long long po[5][200010], ha[5][200010];
int n, m, x;
string s, t;
int dp[200010][40];
long long HASH(int lo, int size, int mo) {
  return ((ha[mo][lo] - ha[mo][lo + size] * po[mo][size]) % mod[mo] + mod[mo]) %
         mod[mo];
}
bool ok(int i, int j, int size) {
  for (int t = 0; t < 1; t++)
    if (HASH(i, size, t) != HASH(j, size, t)) return false;
  return true;
}
int lcp(int i, int j) {
  int lo, hi, mid, tmp;
  tmp = 0;
  lo = 1;
  hi = min(n + m - i, n + m - j);
  while (lo <= hi) {
    mid = (lo + hi) / 2;
    if (ok(i, j, mid)) {
      tmp = mid;
      lo = mid + 1;
    } else
      hi = mid - 1;
  }
  return tmp;
}
int main() {
  cin >> n;
  cin >> s;
  cin >> m;
  cin >> t;
  cin >> x;
  s = s + t;
  for (int i = 0; i < 1; i++) {
    po[i][0] = 1;
    for (int j = 1; j <= n + m + 2; j++)
      po[i][j] = (po[i][j - 1] * 26) % mod[i];
  }
  for (int i = 0; i < 1; i++) {
    ha[i][n + m] = 0;
    for (int j = n + m - 1; j >= 0; j--)
      ha[i][j] = (ha[i][j + 1] * 26 + s[j] - 'a') % mod[i];
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j <= 30; j++) {
      int l = lcp(i, n + dp[i][j]);
      if (l > 0) dp[i + l - 1][j + 1] = max(dp[i + l - 1][j + 1], dp[i][j] + l);
    }
    for (int j = 0; j <= 30; j++) dp[i + 1][j] = max(dp[i][j], dp[i + 1][j]);
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j <= x; j++)
      if (dp[i][j] == m) {
        cout << "YES";
        return 0;
      }
  cout << "NO";
  return 0;
}
