#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 11;
const int X = 33;
int n, m, x;
int a[X], b[X];
char s[MAXN], t[MAXN];
int main() {
  scanf("%d%s%d%s%d\n", &n, s, &m, t, &x);
  int cnt, cur;
  for (int i = 0; i < n; ++i)
    for (int j = x - 1; j >= 0; --j) {
      cur = a[j];
      if (i < b[j]) continue;
      cnt = 0;
      for (int k = 0; cur + k < m; ++k) {
        if (s[i + k] != t[cur + k]) break;
        ++cnt;
      }
      if (cnt == 0) continue;
      if (cur + cnt == m) {
        puts("YES");
        return 0;
      }
      if (a[j + 1] < cur + cnt) {
        a[j + 1] = cur + cnt;
        b[j + 1] = i + cnt;
      }
    }
  puts("NO");
  return 0;
}
