#include <bits/stdc++.h>
using namespace std;
inline int input() {
  int32_t x;
  scanf("%d", &x);
  return x;
}
const int maxn = 1e5 + 10;
const int mod = 1e9 + 7;
int dp[31][maxn];
pair<pair<int, int>, int> lst[maxn * 2];
int order[19][maxn * 2];
inline void build(string &s, int len) {
  for (int i = 0; i < len; i++) lst[i] = {{s[i] - 'a', s[i] - 'a'}, i};
  sort(lst, lst + len);
  for (int i = 0; i < len; i++)
    order[0][lst[i].second] = (i && lst[i].first == lst[i - 1].first)
                                  ? order[0][lst[i - 1].second]
                                  : i;
  for (int h = 1; (1 << h) < len; h++) {
    for (int i = 0; i < len; i++) {
      if (i + (1 << (h - 1)) < len)
        lst[i] = {{order[h - 1][i], order[h - 1][i + (1 << (h - 1))]}, i};
      else
        lst[i] = {{order[h - 1][i], -1}, i};
    }
    sort(lst, lst + len);
    for (int i = 0; i < len; i++)
      order[h][lst[i].second] = (i && lst[i].first == lst[i - 1].first)
                                    ? order[h][lst[i - 1].second]
                                    : i;
  }
}
inline int query(int A, int B, int maxLen) {
  int ret = 0;
  for (int i = 18; i >= 0; i--) {
    if ((1 << i) <= maxLen && order[i][A] == order[i][B]) {
      A += (1 << i), B += (1 << i);
      maxLen -= (1 << i);
      ret += (1 << i);
    }
  }
  return ret;
}
int pref[maxn], shit[maxn];
int32_t main() {
  int n = input();
  string s;
  cin >> s;
  int m = input();
  string t;
  cin >> t;
  int maxCut = input();
  string con = s;
  con += '@';
  con += t;
  build(con, n + m + 1);
  int maxi = 0;
  for (int cntCut = 1; cntCut <= maxCut; cntCut++) {
    for (int i = 0; i < n; i++) shit[i] = 0;
    for (int start = 0; start < n; start++) {
      int maxPref = pref[start];
      int remLen = m - maxPref;
      int okLen = query(start, n + maxPref + 1, remLen);
      dp[cntCut][start] = max(dp[cntCut][start], okLen + maxPref);
      maxi = max(maxi, dp[cntCut][start]);
      shit[start + okLen] = max(shit[start + okLen], okLen + maxPref);
    }
    for (int i = 0; i < n; i++) {
      pref[i] = max(pref[i], shit[i]);
      if (i) pref[i] = max(pref[i - 1], pref[i]);
    }
  }
  if (maxi == m) return cout << "YES\n", 0;
  cout << "NO\n";
}
