#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int maxx = 35;
const int maxn = 1e5 + 5;
int n, m;
int x;
char s[maxn], t[maxn];
int a[maxx], b[maxx];
int main() {
  scanf("%d%s%d%s%d", &n, &s, &m, &t, &x);
  int cur, cnt;
  for (int i = 0; i < n; i++) {
    for (int j = x - 1; j >= 0; j--) {
      if (i < b[j]) continue;
      cur = a[j];
      for (cnt = 0; cur + cnt < m; cnt++) {
        if (s[i + cnt] != t[cur + cnt]) break;
      }
      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;
}
