#include <bits/stdc++.h>
using namespace std;
const long long int mod[2] = {1000000861, 1000004329};
int n, m, x;
string s, t;
const int N = 1e5 + 5;
int dp[N][35];
pair<int, int> h1[N][2];
int po[N][2];
int ip[N][2];
int add(int a, int b, int op) {
  int ret = a + b;
  if (ret >= mod[op]) ret -= mod[op];
  return ret;
}
int mul(int a, int b, int op) {
  long long ret = 1LL * a * b;
  if (ret >= mod[op]) ret %= mod[op];
  return ret;
}
inline int get(int l, int r, int str) {
  int ret = h1[r][str].first;
  ret -= (h1[l - 1][str].first);
  if (ret < 0) ret += mod[0];
  if (ret >= mod[0]) ret -= mod[0];
  ret = mul(ret, ip[l][0], 0);
  return ret;
}
int fp(int b, int e, int op) {
  if (e == 0) return 1;
  if (e == 1) return b;
  int ret = fp(b, e / 2, op);
  ret = mul(ret, ret, op);
  if (e % 2) ret = mul(ret, b, op);
  return ret;
}
bool valid(int i, int j, int k) {
  int lo = 1, hi = min(i, j);
  int ans = 0;
  while (lo <= hi) {
    int mid = (lo + hi) >> 1;
    if (get(i - mid + 1, i, 0) == get(j - mid + 1, j, 1)) {
      ans = max(ans, mid);
      lo = mid + 1;
    } else
      hi = mid - 1;
  }
  if (dp[i - ans][k - 1] >= (j - ans))
    return true;
  else
    return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> s >> m >> t >> x;
  memset(dp, 0, sizeof(dp));
  po[0][0] = po[0][1] = ip[0][0] = ip[0][1] = 1;
  int inv[2] = {fp(37, mod[0] - 2, 0), fp(37, mod[1] - 2, 1)};
  for (int i = 1; i < N; i++) {
    for (int op = 0; op <= 1; op++) {
      po[i][op] = mul(po[i - 1][op], 37, op);
      ip[i][op] = mul(ip[i - 1][op], inv[op], op);
    }
  }
  h1[0][0] = {0, 0};
  s = " " + s;
  t = " " + t;
  pair<int, int> p = {1, 1};
  for (int i = 1; i <= n; i++) {
    h1[i][0].first =
        add(h1[i - 1][0].first, mul(s[i] - 'a' + 1, p.first, 0), 0);
    p.first = mul(p.first, 37, 0);
    h1[i][0].second =
        add(h1[i - 1][0].second, mul(s[i] - 'a' + 1, p.second, 1), 1);
    p.second = mul(p.second, 37, 1);
  }
  p = {1, 1};
  for (int i = 1; i <= m; i++) {
    h1[i][1].first =
        add(h1[i - 1][1].first, mul(t[i] - 'a' + 1, p.first, 0), 0);
    p.first = mul(p.first, 37, 0);
    h1[i][1].second =
        add(h1[i - 1][1].second, mul(t[i] - 'a' + 1, p.second, 1), 1);
    p.second = mul(p.second, 37, 1);
  }
  for (int k = 1; k <= x; k++) {
    int j = 0;
    for (int i = 1; i <= n; i++) {
      dp[i][k] = dp[i - 1][k];
      while (j <= m && valid(i, j, k)) j++;
      dp[i][k] = max(dp[i][k], j - 1);
    }
  }
  bool ans = false;
  for (int k = 1; k <= x; k++)
    if (dp[n][k] == m) ans = true;
  if (ans)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
