#include <bits/stdc++.h>
using namespace std;
void setIO(string s = "") {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin.exceptions(cin.failbit);
  if ((long long)(s).size()) {
    freopen((s + ".in").c_str(), "r", stdin);
    freopen((s + ".out").c_str(), "w", stdout);
  }
}
const long long MOD = 1e9 + 9;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
uniform_int_distribution<long long> BDIST(0.1 * MOD, 0.9 * MOD);
const array<long long, 2> base = {BDIST(rng), BDIST(rng)};
vector<array<long long, 2>> pows = {{1, 1}};
struct HashRange {
  string S;
  vector<array<long long, 2>> cum = {{0, 0}};
  void add(char c) {
    S += c;
    cum.push_back({(base[0] * cum.back()[0] + c) % MOD,
                   (base[1] * cum.back()[1] + c) % MOD});
  }
  void add(string s) {
    for (auto c : s) add(c);
  }
  void extend(long long len) {
    while ((long long)(pows.size()) <= len) {
      pows.push_back(
          {(base[0] * pows.back()[0]) % MOD, (base[1] * pows.back()[1]) % MOD});
    }
  }
  array<long long, 2> hash(long long l, long long r) {
    long long len = r + 1 - l;
    extend(len);
    return {((cum[r + 1][0] - pows[len][0] * cum[l][0]) % MOD + MOD) % MOD,
            ((cum[r + 1][1] - pows[len][1] * cum[l][1]) % MOD + MOD) % MOD};
  }
};
signed main() {
  setIO();
  long long n, m, x;
  string s, t;
  cin >> n >> s >> m >> t >> x;
  HashRange S, T;
  S.add(s);
  T.add(t);
  long long dp[n + 7][x + 7];
  memset(dp, -1, sizeof(dp));
  auto LCP = [&](long long i, long long j) {
    if (i >= n or j >= m) return -1ll;
    if (s[i] != t[j]) return 0ll;
    long long lo = 1, hi = min(n - i, m - j) + 1;
    while (hi - lo > 1) {
      long long mid = (hi + lo) / 2;
      array<long long, 2> h1 = S.hash(i, i + mid - 1),
                          h2 = T.hash(j, j + mid - 1);
      h1[0] == h2[0] && h1[1] == h2[1] ? lo = mid : hi = mid;
    }
    return lo;
  };
  for (long long i = 0; i < LCP(0, 0); ++i) dp[i][1] = i;
  for (long long i = 0; i < n; ++i) {
    for (long long j = 0; j <= x; ++j) {
      if (dp[i][j] == m - 1) return cout << "YES", 0;
      if (s[i] == t[0] && j > 0) dp[i][j] = max(dp[i][j], 0ll);
      dp[i + 1][j] = max(dp[i + 1][j], dp[i][j]);
      long long lcp = LCP(i + 1, dp[i][j] + 1);
      if (lcp == -1) continue;
      dp[i + lcp][j + 1] = max(dp[i + lcp][j + 1], dp[i][j] + lcp);
    }
  }
  cout << "NO";
}
