#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
const int INF = 1e9 + 10;
int dp[N][40];
struct SuffixArray {
  string s;
  vector<int> logs;
  int log;
  int n;
  vector<vector<int> > c;
  vector<int> p;
  SuffixArray() {}
  SuffixArray(const string& s) : s(s), n((int((s).size()))) {
    logs.assign(n + 1, 0);
    for (int(i) = (2); (i) < (n + 1); (i)++) logs[i] = logs[i / 2] + 1;
    for (log = 0; (1 << log) < n; log++)
      ;
    c.assign(log + 1, vector<int>(n));
    p.assign(n, 0);
    vector<int> cnt(256, 0);
    for (int(i) = (0); (i) < (n); (i)++) cnt[s[i]]++;
    for (int(i) = (1); (i) < ((int((cnt).size()))); (i)++) cnt[i] += cnt[i - 1];
    for (int i = n - 1; i >= 0; i--) p[--cnt[s[i]]] = i;
    c[0][p[0]] = 0;
    int cls = 1;
    for (int(i) = (1); (i) < (n); (i)++) {
      if (s[p[i]] != s[p[i - 1]]) cls++;
      c[0][p[i]] = cls - 1;
    }
    vector<int> pn(n, 0);
    for (int l = 0; l < log; l++) {
      cnt.assign(n, 0);
      for (int(i) = (0); (i) < (n); (i)++) cnt[c[l][i]]++;
      for (int(i) = (1); (i) < (n); (i)++) cnt[i] += cnt[i - 1];
      for (int i = n - 1; i >= 0; i--) pn[--cnt[c[l][(i + (1 << l)) % n]]] = i;
      cnt.assign(n, 0);
      for (int(i) = (0); (i) < (n); (i)++) cnt[c[l][i]]++;
      for (int(i) = (1); (i) < (n); (i)++) cnt[i] += cnt[i - 1];
      for (int i = n - 1; i >= 0; i--) p[--cnt[c[l][pn[i]]]] = pn[i];
      c[l + 1][p[0]] = 0;
      int cls = 1;
      for (int(i) = (1); (i) < (n); (i)++) {
        if (c[l][p[i]] != c[l][p[i - 1]] ||
            c[l][(p[i - 1] + (1 << l)) % n] != c[l][(p[i] + (1 << l)) % n])
          cls++;
        c[l + 1][p[i]] = cls - 1;
      }
    }
  }
  int cmp(int i, int j, int l) {
    int k = logs[l];
    auto p1 = make_pair(c[k][i], c[k][i + l - (1 << k)]);
    auto p2 = make_pair(c[k][j], c[k][j + l - (1 << k)]);
    return p1 == p2 ? 0 : p1 < p2 ? -1 : 1;
  }
  int lcp(int i, int j) {
    int ret = 0;
    for (int l = log; l >= 0; l--) {
      if (i + (1 << l) <= n && j + (1 << l) <= n && c[l][i] == c[l][j]) {
        ret += (1 << l);
        i += (1 << l);
        j += (1 << l);
      }
    }
    return ret;
  }
};
int main(int argc, char* argv[]) {
  ios::sync_with_stdio(0);
  string a, b;
  int na, nb;
  cin >> na;
  cin >> a;
  cin >> nb;
  cin >> b;
  int x;
  cin >> x;
  string q = a + '$' + b + '#';
  SuffixArray sf(q);
  for (int(i) = (0); (i) < (na + 1); (i)++) {
    for (int(cnt) = (0); (cnt) < (x + 1); (cnt)++) {
      if (a[i] == b[dp[i][cnt]]) {
        int len = sf.lcp(i, na + 1 + dp[i][cnt]);
        if (i + len <= na && cnt + 1 <= x) {
          dp[i + len][cnt + 1] = max(dp[i + len][cnt + 1], dp[i][cnt] + len);
        }
      }
      if (i + 1 <= na) {
        dp[i + 1][cnt] = max(dp[i + 1][cnt], dp[i][cnt]);
      }
    }
  }
  bool can = false;
  for (int(i) = (0); (i) < (x + 1); (i)++) {
    if (dp[na][i] == nb) {
      can = 1;
      break;
    }
  }
  if (can) {
    cout << "YES\n";
  } else {
    cout << "NO\n";
  }
  return 0;
}
