#include <bits/stdc++.h>
using namespace std;
template <class T>
bool cmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool cmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
const int N = 123456;
const int K = 30 + 5;
const int mod = 1e9 + 7;
void madd(int& a, int b) {
  a += b;
  if (a >= mod) a -= mod;
}
int mul(int a, int b) { return (1LL * a * b) % mod; }
int mpow(int a, int n) {
  int r = 1;
  while (n > 0) {
    if (n & 1) r = mul(r, a);
    a = mul(a, a);
    n >>= 1;
  }
  return r;
}
int pow2[N], wop2[N];
int hh[256];
void precompute_powers() {
  int i2 = mpow(2, mod - 2);
  pow2[0] = wop2[0] = 1;
  for (int i = 1; i < N; i++) {
    pow2[i] = mul(pow2[i - 1], 2);
    wop2[i] = mul(wop2[i - 1], i2);
  }
}
struct hasher {
  int n;
  char s[N];
  int H[N];
  void read() { cin >> n >> s; }
  void precompute() {
    H[0] = hh[(int)s[0]];
    for (int i = 1; i < n; i++) {
      H[i] = H[i - 1];
      madd(H[i], mul(pow2[i], hh[(int)s[i]]));
    }
  }
  int hash(int i, int j) {
    int h = H[j];
    if (i > 0) madd(h, mod - H[i - 1]);
    return mul(h, wop2[i]);
  }
  char operator[](const int& i) { return s[i]; }
} S, T;
int nsub;
int dp[N][K];
int lcp(int i, int j) {
  int lo = 0, hi = min(S.n - i, T.n - j);
  while (lo < hi) {
    int mid = (lo + hi + 1) / 2;
    if (S.hash(i, i + mid - 1) == T.hash(j, j + mid - 1)) {
      lo = mid;
    } else {
      hi = mid - 1;
    }
  }
  return lo;
}
int main() {
  srand(1234);
  for (char c = 'a'; c <= 'z'; c++) hh[(int)c] = (rand() % mod);
  precompute_powers();
  S.read();
  S.precompute();
  T.read();
  T.precompute();
  cin >> nsub;
  memset(dp, -1, sizeof dp);
  dp[0][0] = 0;
  for (int i = 0; i < S.n; i++) {
    for (int j = 0; j <= nsub; j++) {
      if (dp[i][j] == -1) continue;
      cmax(dp[i + 1][j], dp[i][j]);
      int l = lcp(i, dp[i][j]);
      if (l > 0) {
        cmax(dp[i + l][j + 1], dp[i][j] + l);
      }
    }
  }
  int ok = 0;
  for (int j = 0; j <= nsub; j++) {
    ok |= dp[S.n][j] == T.n;
  }
  puts(ok ? "YES" : "NO");
  return 0;
}
