#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
const int X = 32;
const int B = 1e5 + 7;
const int BASE = 1e9 + 9;
int n, m, x;
int dp[N][X];
long long H[2][N], Pow[N];
char S[N], T[N];
void BuildHash() {
  H[0][0] = H[1][0] = 0;
  Pow[0] = 1;
  for (int i = 1; i <= n; ++i)
    H[0][i] = (H[0][i - 1] * B + (S[i] - 'a' + 1)) % BASE;
  for (int i = 1; i <= m; ++i)
    H[1][i] = (H[1][i - 1] * B + (T[i] - 'a' + 1)) % BASE;
  for (int i = 1; i <= max(n, m); ++i) Pow[i] = Pow[i - 1] * B % BASE;
}
long long Hash(int k, int l, int r) {
  return (H[k][r] - H[k][l - 1] * Pow[r - l + 1] + (long long)BASE * BASE) %
         BASE;
}
int main() {
  scanf("%d%s", &n, S + 1);
  scanf("%d%s", &m, T + 1);
  scanf("%d", &x);
  BuildHash();
  memset(dp, -1, sizeof dp);
  for (int i = 0; i <= n; ++i) dp[i][0] = 0;
  for (int i = 0; i <= n; ++i)
    for (int j = 0; j <= x; ++j)
      if (dp[i][j] != -1) {
        int l = 1, r = min(n - i, m - dp[i][j]), f = -1;
        while (l <= r) {
          int m = (l + r) >> 1;
          if (Hash(0, i + 1, i + m) == Hash(1, dp[i][j] + 1, dp[i][j] + m)) {
            f = m;
            l = m + 1;
          } else
            r = m - 1;
        }
        dp[i + 1][j] = max(dp[i + 1][j], dp[i][j]);
        if (f != -1) dp[i + f][j + 1] = max(dp[i + f][j + 1], dp[i][j] + f);
      }
  for (int i = 0; i <= n; ++i)
    for (int j = 0; j <= x; ++j)
      if (dp[i][j] == m) {
        puts("YES");
        return 0;
      }
  puts("NO");
  return 0;
}
