#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 3;
const long long MOD = 1e9 + 7;
const long long MOD2 = 1e9 + 9;
long long H1[N + 2], H2[N + 2], P[N + 2], H3[N + 2], H4[N + 2], P2[N + 2];
long long dp[N + 2][33];
const long long B = 26;
int n, m;
long long f(int x, int y, int z, int e) {
  long long a = ((H1[y] - (H1[x - 1] * P[y - x + 1]) % MOD) % MOD + MOD) % MOD;
  long long b = ((H2[e] - (H2[z - 1] * P[e - z + 1]) % MOD) % MOD + MOD) % MOD;
  if (a != b) return 0;
  a = ((H3[y] - (H3[x - 1] * P2[y - x + 1]) % MOD2) % MOD2 + MOD2) % MOD2;
  b = ((H4[e] - (H4[z - 1] * P2[e - z + 1]) % MOD2) % MOD2 + MOD2) % MOD2;
  if (a != b) return 0;
  return 1;
}
int main() {
  string s, t;
  cin >> n;
  cin >> s;
  cin >> m;
  cin >> t;
  int x;
  cin >> x;
  P[0] = P2[0] = 1;
  for (int i = 1; i <= n; i++) P[i] = (P[i - 1] * B) % MOD;
  for (int i = 1; i <= n; i++) P2[i] = (P2[i - 1] * B) % MOD2;
  for (int i = 1; i <= n; i++) {
    H1[i] = (H1[i - 1] * 26 + s[i - 1] - 'a') % MOD;
  }
  for (int i = 1; i <= m; i++) {
    H2[i] = (H2[i - 1] * 26 + t[i - 1] - 'a') % MOD;
  }
  for (int i = 1; i <= n; i++) {
    H3[i] = (H3[i - 1] * 26 + s[i - 1] - 'a') % MOD2;
  }
  for (int i = 1; i <= m; i++) {
    H4[i] = (H4[i - 1] * 26 + t[i - 1] - 'a') % MOD2;
  }
  memset(dp, -1, sizeof(dp));
  for (int i = 0; i <= n; i++) {
    for (int j = 0; j <= x; j++) dp[i][j] = INT_MIN;
  }
  dp[0][0] = 0;
  for (int i = 0; i <= n; i++) {
    for (int j = 0; j <= x; j++) {
      if (dp[i][j] == INT_MIN) {
        continue;
      }
      if (i + 1 <= n) dp[i + 1][j] = max(dp[i + 1][j], dp[i][j]);
      int lo = -1, hi = min((long long)n - i, (long long)m - dp[i][j]), mi;
      while (hi - lo > 1) {
        mi = (lo + hi) >> 1;
        if (f(i + 1, i + 1 + mi, dp[i][j] + 1, dp[i][j] + 1 + mi)) {
          lo = mi;
        } else
          hi = mi;
      }
      if (j + 1 <= x && lo != -1)
        dp[i + 1 + lo][j + 1] = max(dp[i + 1 + lo][j + 1], dp[i][j] + 1 + lo);
    }
  }
  bool ok = 0;
  for (int i = 0; i <= x; i++) {
    if (dp[n][i] == m) {
      ok = 1;
    }
  }
  if (ok)
    puts("YES");
  else
    puts("NO");
}
