#include <bits/stdc++.h>
using namespace std;
const int kN = 100 * 1000 + 5;
const int kX = 30 + 5;
const int kBase = 29;
const long long kMod = 1000000009LL;
long long hs[kN], ht[kN], pows[kN];
int dp[kN][kX];
long long Add(long long a, long long b) {
  long long res = a + b;
  return res >= kMod ? res - kMod : res;
}
long long Sub(long long a, long long b) {
  long long res = a - b;
  return res < 0 ? res + kMod : res;
}
long long Mul(long long a, long long b) { return a * b % kMod; }
void CalcPows() {
  pows[0] = 1;
  for (int i = 1; i < kN; ++i) {
    pows[i] = Mul(pows[i - 1], kBase);
  }
}
void CalcHash(const string& str, long long h[]) {
  h[0] = 0;
  for (int i = 0; i < str.size(); ++i) {
    h[i + 1] = Add(Mul(h[i], kBase), str[i] - 'a' + 1);
  }
}
long long GetHash(long long h[], int l, int r) {
  return Sub(h[r + 1], Mul(h[l], pows[r - l + 1]));
}
int Lcp(long long hs[], int offs, long long ht[], int offt, int max_lcp) {
  int l = 0, r = max_lcp;
  while (l < r) {
    int m = (l + r + 1) >> 1;
    if (GetHash(hs, offs, offs + m - 1) == GetHash(ht, offt, offt + m - 1)) {
      l = m;
    } else {
      r = m - 1;
    }
  }
  return l;
}
int main() {
  std::ios_base::sync_with_stdio(false);
  int n;
  string s;
  cin >> n >> s;
  int m;
  string t;
  cin >> m >> t;
  int x;
  cin >> x;
  CalcPows();
  CalcHash(s, hs);
  CalcHash(t, ht);
  memset(dp, 0, sizeof(dp));
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j <= x; ++j) {
      dp[i + 1][j] = max(dp[i + 1][j], dp[i][j]);
      int lcp =
          Lcp(hs, i, ht, dp[i][j], min(s.size() - i, t.size() - dp[i][j]));
      dp[i + lcp][j + 1] = max(dp[i + lcp][j + 1], dp[i][j] + lcp);
    }
  }
  cout << (dp[n][x] >= m ? "YES\n" : "NO\n");
  return 0;
}
