#include <bits/stdc++.h>
using namespace std;
mt19937 twister(chrono::steady_clock().now().time_since_epoch().count());
const int mod = 1e9 + 7;
const int maxn = 2e5 + 88;
const int inf = 1e9 + 88;
const int logn = 22;
const int maxa = 3e6 + 88;
const char sgl[5] = {'a', 'e', 'i', 'o', 'u'};
const char sep = 'a' - 1;
int readint() {
  int cur;
  scanf("%d", &cur);
  return cur;
}
void maxi(int &a, int b) { a = max(a, b); }
void mini(int &a, int b) { a = min(a, b); }
int rnd(int l, int r) { return abs((int)twister()) % (r - l + 1) + l; }
string s, t, cur;
int dp[31][maxn];
int lcp[logn][maxn];
int suff[maxn], c[maxn], cursuff[maxn], curc[maxn], order[maxn];
int cnt[maxn];
int len[maxn];
void step(int h) {
  int i, l = cur.length();
  int no = 0;
  for (i = 0; i < l; i++) {
    cursuff[i] = suff[i] - (1 << h);
    if (cursuff[i] < 0) cursuff[i] += l;
    cnt[c[i]]++;
    no = max(no, c[i] + 1);
  }
  for (i = 1; i < no; i++) cnt[i] += cnt[i - 1];
  for (i = l - 1; i >= 0; i--) suff[--cnt[c[cursuff[i]]]] = cursuff[i];
  for (i = 0; i < no; i++) cnt[i] = 0;
  curc[suff[0]] = 0;
  no = 0;
  int last = suff[0] + (1 << h);
  if (last >= l) last -= l;
  for (i = 1; i < l; i++) {
    int now = suff[i] + (1 << h);
    if (now < 0) now += l;
    if (c[last] != c[now] || c[suff[i]] != c[suff[i - 1]]) no++;
    curc[suff[i]] = no;
    last = now;
  }
  for (i = 0; i < l; i++) c[i] = curc[i];
}
void buildsuff() {
  int l = cur.length(), i;
  for (i = 0; i < l; i++) cnt[cur[i] - sep]++;
  for (i = 1; i < 27; i++) cnt[i] += cnt[i - 1];
  for (i = l - 1; i >= 0; i--) suff[--cnt[cur[i] - sep]] = i;
  for (i = 0; i < 27; i++) cnt[i] = 0;
  c[suff[0]] = 0;
  int no = 0;
  for (i = 1; i < l; i++) {
    if (cur[suff[i]] != cur[suff[i - 1]]) no++;
    c[suff[i]] = no;
  }
  for (i = 0; (1 << i) < l; i++) step(i);
  for (i = 0; i < l; i++) order[suff[i]] = i;
}
void buildlcp() {
  int l = cur.length(), k = 0, i, j;
  lcp[0][0] = 0;
  for (i = 0; i < l; i++) {
    k = max(k - 1, 0);
    if (order[i] == l - 1) {
      lcp[0][order[i]] = k = 0;
      continue;
    }
    int suff1 = suff[order[i] + 1];
    while ((max(i, suff1) + k < l) && cur[i + k] == cur[suff1 + k] &&
           cur[i + k] != sep)
      k++;
    lcp[0][order[i]] = k;
  }
  for (i = 1; (1 << i) <= l; i++)
    for (j = 0; j + (1 << i) <= l; j++)
      lcp[i][j] = min(lcp[i - 1][j], lcp[i - 1][j + (1 << (i - 1))]);
}
int getlcp(int suff1, int suff2) {
  int no1 = order[suff1], no2 = order[suff2];
  if (no2 < no1) swap(no1, no2);
  int lg = len[no2 - no1];
  return min(lcp[lg][no1], lcp[lg][no2 - (1 << lg)]);
}
int main() {
  int n, m, x, i, j;
  cin >> n;
  cin >> s;
  cin >> m;
  cin >> t;
  cin >> x;
  cur = s + sep + t + sep;
  buildsuff();
  buildlcp();
  for (i = 1; (1 << i) < maxn; i++) len[1 << i]++;
  for (i = 2; i < maxn; i++) len[i] += len[i - 1];
  dp[0][0] = 0;
  for (j = 0; j <= n; j++)
    for (i = 0; i <= 30; i++) {
      maxi(dp[i][j + 1], dp[i][j]);
      if (i != 30) {
        int l = getlcp(j, n + dp[i][j] + 1);
        if (l != 0) maxi(dp[i + 1][j + l], dp[i][j] + l);
      }
    }
  for (i = 0; i <= x; i++)
    if (dp[i][n] == m) {
      cout << "YES";
      return 0;
    }
  cout << "NO";
  return 0;
}
