#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
const int X = 30 + 5;
const int D = 20;
struct SuffixArray {
  int n, len, s[N];
  int sa[N], rk[N], height[N];
  int tmp_one[N], tmp_two[N], c[N];
  int dp[N][D];
  void initString(string str);
  void buildSA(int m = 128);
  void calcHeight();
  void initST();
  int RMQ(int l, int r);
  void debug(char* str);
} SA;
int n, m, x;
string s, t;
char tmp[N];
int dp[N / 2][X];
bool solve() {
  string all = s + "#" + t;
  SA.initString(all);
  SA.buildSA();
  SA.calcHeight();
  SA.initST();
  memset(dp, -1, sizeof(dp));
  dp[0][0] = 0;
  for (int preS = 0; preS <= n; ++preS) {
    for (int cnt = 0; cnt <= x; ++cnt) {
      if (dp[preS][cnt] == -1) continue;
      if (preS + 1 <= n && dp[preS + 1][cnt] < dp[preS][cnt])
        dp[preS + 1][cnt] = dp[preS][cnt];
      if (cnt + 1 <= x) {
        int preT = dp[preS][cnt];
        int lcp = SA.RMQ(SA.rk[preS], SA.rk[n + 1 + preT]);
        if (dp[preS + lcp][cnt + 1] < dp[preS][cnt]) {
          dp[preS + lcp][cnt + 1] = dp[preS][cnt] + lcp;
        }
      }
    }
  }
  for (int cnt = 0; cnt <= x; ++cnt)
    if (dp[n][cnt] == m) return true;
  return false;
}
int main() {
  cin >> n >> s >> m >> t >> x;
  cout << (solve() ? "YES" : "NO") << '\n';
  return 0;
}
void SuffixArray::debug(char* str) {
  puts("/* Suffix */");
  for (int i = 0; i < n; ++i) {
    printf("%s\n", str + sa[i]);
  }
}
int SuffixArray::RMQ(int l, int r) {
  if (l > r) swap(l, r);
  l++;
  int k = 0;
  while (1 << (k + 1) <= r - l + 1) k++;
  return min(dp[l][k], dp[r - (1 << k) + 1][k]);
}
void SuffixArray::initST() {
  for (int i = 0; i < n; ++i) dp[i][0] = height[i];
  for (int j = 1; (1 << j) <= n; ++j) {
    for (int i = 0; i + (1 << j) - 1 < n; ++i) {
      dp[i][j] = min(dp[i][j - 1], dp[i + (1 << (j - 1))][j - 1]);
    }
  }
}
void SuffixArray::initString(string str) {
  len = str.length();
  for (int i = 0; i < len; ++i) {
    s[i] = str[i];
  }
  s[len] = '$';
  n = len + 1;
}
void SuffixArray::calcHeight() {
  for (int i = 0; i < n; ++i) rk[sa[i]] = i;
  int k = height[0] = 0;
  for (int i = 0; i < n - 1; ++i) {
    if (k) k--;
    int j = sa[rk[i] - 1];
    while (s[i + k] == s[j + k]) k++;
    height[rk[i]] = k;
  }
}
void SuffixArray::buildSA(int m) {
  int i, j, p, *x = tmp_one, *y = tmp_two;
  for (i = 0; i < m; ++i) c[i] = 0;
  for (i = 0; i < n; ++i) c[x[i] = s[i]]++;
  for (i = 1; i < m; ++i) c[i] += c[i - 1];
  for (i = n - 1; i >= 0; --i) sa[--c[x[i]]] = i;
  for (j = 1, p = 1; p < n; j <<= 1, m = p) {
    for (p = 0, i = n - j; i < n; ++i) y[p++] = i;
    for (i = 0; i < n; ++i)
      if (sa[i] >= j) y[p++] = sa[i] - j;
    for (i = 0; i < m; ++i) c[i] = 0;
    for (i = 0; i < n; ++i) c[x[y[i]]]++;
    for (i = 1; i < m; ++i) c[i] += c[i - 1];
    for (i = n - 1; i >= 0; --i) sa[--c[x[y[i]]]] = y[i];
    swap(x, y);
    for (p = 1, x[sa[0]] = 0, i = 1; i < n; ++i) {
      x[sa[i]] =
          (y[sa[i - 1]] == y[sa[i]] && y[sa[i - 1] + j] == y[sa[i] + j] ? p - 1
                                                                        : p++);
    }
  }
}
