#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5;
char s[maxn + 50], t[maxn + 50];
int sa[maxn + 50], rk[maxn + 50], height[maxn + 50], d[maxn + 50][30],
    temp[maxn + 50], temp2[maxn + 50], c[maxn + 50];
int n, m, x, len;
int dp[maxn + 50][35];
void getsa(int m) {
  memset(temp, -1, sizeof(temp));
  memset(temp2, -1, sizeof(temp2));
  int *x = temp, *y = temp2;
  for (int i = 0; i < m; ++i) c[i] = 0;
  for (int i = 0; i < len; ++i) c[x[i] = s[i]]++;
  for (int i = 1; i < m; ++i) c[i] += c[i - 1];
  for (int i = len - 1; i >= 0; --i) sa[--c[x[i]]] = i;
  for (int k = 1; k <= len; k <<= 1) {
    int p = 0;
    for (int i = len - k; i < len; ++i) y[p++] = i;
    for (int i = 0; i < len; ++i)
      if (sa[i] >= k) y[p++] = sa[i] - k;
    for (int i = 0; i < m; ++i) c[i] = 0;
    for (int i = 0; i < len; ++i) c[x[y[i]]]++;
    for (int i = 0; i < m; ++i) c[i] += c[i - 1];
    for (int i = len - 1; i >= 0; --i) sa[--c[x[y[i]]]] = y[i];
    swap(x, y);
    p = 1, x[sa[0]] = 0;
    for (int i = 1; i < len; ++i)
      if (y[sa[i - 1]] == y[sa[i]] && y[sa[i - 1] + k] == y[sa[i] + k])
        x[sa[i]] = p - 1;
      else
        x[sa[i]] = p++;
    if (p >= len) break;
    m = p;
  }
}
void getheight() {
  int k = 0;
  for (int i = 0; i < len; ++i) rk[sa[i]] = i;
  for (int i = 0; i < len; ++i) {
    if (k) --k;
    if (rk[i] == 0) continue;
    int j = sa[rk[i] - 1];
    while (s[i + k] == s[j + k]) ++k;
    height[rk[i]] = k;
  }
}
void rmq_init() {
  for (int i = 0; i < len; i++) d[i][0] = height[i];
  for (int j = 1; (1 << j) - 1 <= len; j++)
    for (int i = 0; i + (1 << j) - 1 < len; i++)
      d[i][j] = min(d[i][j - 1], d[i + (1 << (j - 1))][j - 1]);
}
int lcp(int l, int r) {
  if (l < 0 || r >= len) return 0;
  l = rk[l], r = rk[r];
  if (l > r) swap(l, r);
  ++l;
  int k = 0;
  while ((1 << (k + 1)) <= r - l + 1) k++;
  return min(d[l][k], d[r - (1 << k) + 1][k]);
}
int main() {
  scanf("%d%s%d%s%d", &n, s, &m, t, &x);
  s[n] = '#';
  for (int i = 0; i <= m; ++i) s[i + n + 1] = t[i];
  len = n + m + 1;
  getsa('z' + 1);
  getheight();
  rmq_init();
  int u = lcp(0, n + 1);
  for (int i = 0; i < u; ++i) dp[i][1] = i + 1;
  for (int i = 0; i < n; ++i)
    for (int j = 0; j <= x; ++j) {
      dp[i + 1][j] = max(dp[i + 1][j], dp[i][j]);
      int u = lcp(i + 1, dp[i][j] + n + 1);
      dp[i + u][j + 1] = max(dp[i + u][j + 1], dp[i][j] + u);
    }
  for (int i = 1; i <= x; ++i)
    if (dp[n - 1][i] >= m) return 0 * printf("YES");
  printf("NO");
  return 0;
}
