#include <bits/stdc++.h>
using namespace std;
template <class T>
bool umin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool umax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
int S[200009][22], c[200009], n, m, k, dp[200009][33], offset;
pair<int, int> C[200009];
char s[200009], t[200009];
bool cmp(int x, int y) { return (C[x] < C[y]); }
int lcp(int x, int y) {
  int res = 0;
  y += offset + 1;
  for (int i = 18; i >= 0; i--)
    if (x <= n and y <= n and S[x][i] == S[y][i])
      res += (1 << i), x += (1 << i), y += (1 << i);
  return res;
}
int main() {
  scanf("%d%s%d%s%d", &n, s + 1, &m, t + 1, &k);
  s[n + 1] = '{';
  for (int i = 1; i <= m; i++) s[n + 1 + i] = t[i];
  offset = n;
  n += m + 1;
  for (int i = 1; i <= n; i++) S[i][0] = (s[i] - 'a' + 1);
  for (int j = 1; j <= 18; j++) {
    for (int i = 1; i <= n; i++)
      C[i] = make_pair(
          S[i][j - 1],
          (i + (1 << (j - 1)) <= n ? S[i + (1 << (j - 1))][j - 1] : -1)),
      c[i] = i;
    sort(c + 1, c + n + 1, cmp);
    for (int i = 1; i <= n; i++)
      S[c[i]][j] = S[c[i - 1]][j] + (C[c[i]] != C[c[i - 1]]);
  }
  for (int i = 0; i < offset; i++)
    for (int j = 0; j <= k; j++) {
      umax(dp[i + 1][j], dp[i][j]);
      if (j < k) {
        int val = lcp(i + 1, dp[i][j] + 1);
        umax(dp[i + val][j + 1], dp[i][j] + val);
      }
    }
  for (int j = 1; j <= k; j++)
    if (dp[offset][j] >= m) return 0 * puts("YES");
  puts("NO");
  return 0;
}
