#include <bits/stdc++.h>
using namespace std;
vector<int> hashA, hashB, hashAx, hashBx;
long long inv[100010], invx[100010];
long long power[1000010], powerx[100010];
long long modexp(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = (ans * a) % 1000000007;
    a = (a * a) % 1000000007;
    b /= 2;
  }
  return ans;
}
long long modexpx(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = (ans * a) % 15487019;
    a = (a * a) % 15487019;
    b /= 2;
  }
  return ans;
}
vector<int> createhash(string A) {
  vector<int> x;
  for (int i = 0; i < A.length(); i++) {
    x.push_back(((A[i] - 97) * power[i]) % 1000000007);
  }
  for (int i = 1; i < A.length(); i++) {
    x[i] = (x[i] + x[i - 1]) % 1000000007;
  }
  return x;
}
vector<int> createhash1(string A) {
  vector<int> x;
  for (int i = 0; i < A.length(); i++) {
    x.push_back(((A[i] - 97) * powerx[i]) % 15487019);
  }
  for (int i = 1; i < A.length(); i++) {
    x[i] = (x[i] + x[i - 1]) % 15487019;
  }
  return x;
}
long long modinv(long long a) { return modexp(a, 1000000007 - 2); }
long long modinvx(long long a) { return modexpx(a, 15487019 - 2); }
int findlcp(int x, int y) {
  x--;
  y--;
  int low = 1, high = min(hashA.size() - x, hashB.size() - y) + 1;
  while (low < high) {
    int mid = (low + high) / 2;
    long long hasheqA =
        (((hashA[x + mid - 1] - (x ? hashA[x - 1] : 0) + 1000000007) %
          1000000007) *
         inv[x + 1]) %
        1000000007;
    long long hasheqB =
        (((hashB[y + mid - 1] - (y ? hashB[y - 1] : 0) + 1000000007) %
          1000000007) *
         inv[y + 1]) %
        1000000007;
    long long hasheqA2 =
        (((hashAx[x + mid - 1] - (x ? hashAx[x - 1] : 0) + 15487019) %
          15487019) *
         invx[x + 1]) %
        15487019;
    long long hasheqB2 =
        (((hashBx[y + mid - 1] - (y ? hashBx[y - 1] : 0) + 15487019) %
          15487019) *
         invx[y + 1]) %
        15487019;
    if (hasheqA != hasheqB || hasheqB2 != hasheqA2)
      high = mid;
    else
      low = mid + 1;
  }
  return low - 1;
}
int dp[100010][32];
int main() {
  ios::sync_with_stdio(false);
  int n, m, x;
  string A, B;
  cin >> n;
  cin >> A;
  cin >> m;
  cin >> B;
  cin >> x;
  for (int i = 0; i <= max(A.length(), B.length()); i++) {
    power[i] = modexp(59, i);
    powerx[i] = modexpx(67, i);
  }
  for (int i = 0; i <= max(A.length(), B.length()); i++) {
    inv[i] = modinv(power[i]);
    invx[i] = modinvx(powerx[i]);
  }
  hashA = createhash(A);
  hashB = createhash(B);
  hashAx = createhash1(A);
  hashBx = createhash1(B);
  memset(dp, 0, sizeof(dp));
  dp[0][0] = 0;
  for (int i = 0; i <= A.length(); i++)
    for (int j = 0; j <= x; j++) {
      dp[i + 1][j] = max(dp[i + 1][j], dp[i][j]);
      int lcp = findlcp(i + 1, dp[i][j] + 1);
      dp[i + lcp][j + 1] = max(dp[i][j] + lcp, dp[i + lcp][j + 1]);
    }
  if (dp[A.length()][x] == B.length())
    cout << "YES\n";
  else
    cout << "NO\n";
}
