#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
double PI = 4 * atan(1);
int dp[100005][31];
long long hsh1[100005], hsh2[100005], inv[100005];
int n, m, x;
string second, t;
long long get1(int st, int len) {
  long long ans = hsh1[st + len] - hsh1[st];
  ans = (ans * inv[st]) % MOD;
  return (ans + MOD) % MOD;
}
long long get2(int st, int len) {
  long long ans = hsh2[st + len] - hsh2[st];
  ans = (ans * inv[st]) % MOD;
  return (ans + MOD) % MOD;
}
int binsearch(int x, int y) {
  int lo = 0, hi = min(second.length() - x, t.length() - y);
  while (lo < hi) {
    int mid = (lo + hi + 1) / 2;
    if (get1(x, mid) == get2(y, mid))
      lo = mid;
    else
      hi = mid - 1;
  }
  return lo;
}
void genhsh() {
  long long po = 1;
  for (int i = 0; i < second.length(); i++) {
    hsh1[i + 1] = (hsh1[i] + po * (second[i] - 'a' + 1)) % MOD;
    po = (po * 241) % MOD;
  }
  po = 1;
  for (int i = 0; i < t.length(); i++) {
    hsh2[i + 1] = (hsh2[i] + po * (t[i] - 'a' + 1)) % MOD;
    po = (po * 241) % MOD;
  }
  inv[0] = 1;
  for (int i = 1; i < 100005; i++) inv[i] = (406639007 * inv[i - 1]) % MOD;
}
int main() {
  cin >> n >> second >> m >> t >> x;
  genhsh();
  for (int i = 0; i < second.length() + 1; i++)
    for (int j = 0; j < x + 1; j++) {
      if (i) dp[i][j] = max(dp[i][j], dp[i - 1][j]);
      if (j) dp[i][j] = max(dp[i][j], dp[i][j - 1]);
      if (i == second.length() || j == x) continue;
      if (dp[i][j] == m) continue;
      if (second[i] != t[dp[i][j]]) continue;
      int z = binsearch(i, dp[i][j]);
      dp[i + z][j + 1] = max(dp[i + z][j + 1], dp[i][j] + z);
    }
  if (dp[second.length()][x] == m)
    cout << "YES";
  else
    cout << "NO";
}
