#include <bits/stdc++.h>
using namespace std;
const int mxn = 500005;
int n, m, k;
char second[mxn], t[mxn];
pair<int, int> p[111], nw;
int main() {
  scanf("%d%s%d%s%d", &n, second, &m, t, &k);
  for (int i = 0; i < n; ++i)
    for (int j = k - 1; ~j; --j)
      if (i >= p[j].second) {
        nw.first = p[j].first, nw.second = i;
        while (second[nw.second] == t[nw.first] and nw.first < m)
          ++nw.first, ++nw.second;
        if (nw.first == m) return puts("YES") * 0;
        if (nw.first > p[j + 1].first) p[j + 1] = nw;
      }
  return puts("NO") * 0;
}
