#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5, M = 35;
char s1[N], s2[N];
int n, m, x, g[M], f[M], cnt;
inline int Read() {
  int t = 0, f = 1;
  char c = getchar();
  for (; c > 57 || c < 48; c = getchar())
    if (c == '-') f = -1;
  for (; c > 47 && c < 58; c = getchar()) t = (t << 1) + (t << 3) + c - 48;
  return t * f;
}
int main() {
  g[0] = f[0] = 1;
  n = Read(), scanf("\n%s", s1 + 1);
  m = Read(), scanf("\n%s", s2 + 1);
  x = Read();
  for (int i = 1; i <= n; i++)
    for (int j = 0; j < x; j++) {
      int pos = g[j], cnt = 0;
      if (i < f[j]) continue;
      for (cnt = 0; s1[i + cnt] == s2[pos + cnt] && pos + cnt <= m; cnt++)
        ;
      if (pos + cnt > g[j + 1]) g[j + 1] = pos + cnt, f[j + 1] = i + cnt;
      if (g[j + 1] > m) {
        puts("YES");
        return 0;
      }
    }
  puts("NO");
}
