#include <bits/stdc++.h>
char getch(FILE *fin) {
  char ch = fgetc(fin);
  while (ch == ' ' || ch == '\n') ch = fgetc(fin);
  return ch;
}
const int MAX_N = 200000;
const int MAX_LG = 18;
const int MAX_X = 30;
char str[2 * MAX_N + 2];
int poz[2 * MAX_N + 2], poz2[2 * MAX_N + 2], suf[MAX_N + 1], aux[MAX_N + 1];
int _fr[1 + MAX_N + 1], _firstp[1 + MAX_N + 1];
int *fr = _fr + 1, *firstp = _firstp + 1;
int lcp[MAX_N + 1];
void radixlol(int n, int *cif) {
  int maxch = -1;
  for (int i = 0; i < n; ++i) {
    fr[cif[i]]++;
    if (cif[i] > maxch) maxch = cif[i];
  }
  firstp[-1] = 0;
  for (int i = 0; i <= maxch; ++i) {
    firstp[i] = firstp[i - 1] + fr[i - 1];
    fr[i - 1] = 0;
  }
  fr[maxch] = 0;
  for (int i = 0; i < n; ++i) {
    int x = cif[suf[i]];
    aux[firstp[x]++] = suf[i];
  }
  for (int i = 0; i < n; ++i) suf[i] = aux[i];
}
void kasai(int n) {
  int delta = 0;
  for (int i = 0; i < n; ++i) {
    int p = poz[i];
    while (p < n - 1 && str[i + delta] == str[suf[p + 1] + delta]) ++delta;
    lcp[i] = delta;
    --delta;
    if (delta < 0) delta = 0;
  }
}
int rmq[MAX_LG][MAX_N];
int mylog[1 + MAX_N];
static inline int min(int a, int b) {
  if (a < b) return a;
  return b;
}
static inline int max(int a, int b) { return -min(-a, -b); }
void buildrmq(int n) {
  for (int i = 2; i <= n; ++i) mylog[i] = mylog[i / 2] + 1;
  for (int i = 0; i < n; ++i) rmq[0][i] = lcp[suf[i]];
  for (int l = 1; l < MAX_LG; ++l)
    for (int i = 0; i < n - (1 << l) + 1; ++i)
      rmq[l][i] = min(rmq[l - 1][i], rmq[l - 1][i + (1 << (l - 1))]);
}
static inline int getmin(int a, int b) {
  int l = mylog[b - a + 1];
  return min(rmq[l][a], rmq[l][b - (1 << l) + 1]);
}
static inline int getlcp(int suf1, int suf2) {
  if (suf1 > suf2) suf1 ^= suf2 ^= suf1 ^= suf2;
  return getmin(suf1, suf2 - 1);
}
int dp[1 + MAX_X + 1][1 + MAX_N + 1];
void updpoz(int a, int b, int val) { dp[a][b] = max(dp[a][b], val); }
int main() {
  int n, p2, x;
  int s1, s2;
  scanf("%d", &s1);
  for (int i = 0; i < s1; ++i) str[i] = getch(stdin);
  scanf("%d", &s2);
  for (int i = 0; i < s2; ++i) str[i + s1 + 1] = getch(stdin);
  str[s1] = 'z' + 1;
  scanf("%d", &x);
  n = s1 + s2 + 1;
  for (int i = 0; i < 2 * n; ++i) poz[i] = -1;
  for (int i = 0; i < n; ++i) {
    suf[i] = i;
    poz[i] = str[i] - 'a';
  }
  for (int i = n; i < 2 * n; ++i) str[i] = '\0';
  p2 = 1;
  while (p2 < n) {
    for (int i = 0; i < n; ++i) poz2[i] = poz[i + p2];
    radixlol(n, poz2);
    radixlol(n, poz);
    int j = 0, last1 = poz[suf[0]], last2 = poz2[suf[0]];
    for (int i = 0; i < n; ++i)
      if (poz[suf[i]] == last1 && poz2[suf[i]] == last2)
        poz[suf[i]] = j;
      else {
        last1 = poz[suf[i]];
        last2 = poz2[suf[i]];
        poz[suf[i]] = ++j;
      }
    p2 *= 2;
  }
  kasai(n);
  buildrmq(n - 1);
  for (int j = 0; j < s1; ++j) {
    for (int i = 0; i <= x; ++i) {
      updpoz(i, j + 1, dp[i][j]);
      if (dp[i][j] < s2) {
        int buck = getlcp(poz[j], poz[s1 + dp[i][j] + 1]);
        updpoz(i + 1, j + buck - 1, dp[i][j] + buck);
      }
    }
  }
  bool sepoate = false;
  for (int i = 0; i <= x; ++i)
    if (dp[i][s1 - 1] == s2) sepoate = true;
  if (sepoate)
    printf("YES");
  else
    printf("NO");
  return 0;
}
