#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 2;
int n, m, x;
string s, t;
long long mod_p[N];
long long inv_mod_p[N];
long long prefix[2][N];
long long prefix_hash(long long l, long long r, int ind) {
  long long ans;
  if (l == 0) {
    ans = prefix[ind][r];
  } else {
    ans = prefix[ind][r] - prefix[ind][l - 1];
    if (ans < 1000000007) ans += 1000000007;
    ans *= inv_mod_p[l];
    if (ans >= 1000000007) ans %= 1000000007;
  }
  return ans;
}
void EE(long long a, long long b, long long& x, long long& y) {
  if (a % b == 0) {
    x = 0;
    y = 1;
    return;
  }
  EE(b, a % b, x, y);
  long long temp = x;
  x = y;
  y = temp - y * (a / b);
}
long long inverse(long long a, long long m) {
  long long x, y;
  EE(a, m, x, y);
  if (x < 0) x += m;
  return x;
}
int dp[N][31];
bool check(int sts, int stt, int len) {
  if (sts + len - 1 >= n || stt + len - 1 >= m) return 0;
  if (prefix_hash(sts, sts + len - 1, 0) == prefix_hash(stt, stt + len - 1, 1))
    return 1;
  return 0;
}
int binsrc(int sts, int stt, long long low, long long high) {
  if (low > high) return -1;
  long long mid = (low + high) / 2;
  if (check(sts, stt, mid)) {
    int tmp = binsrc(sts, stt, mid + 1, high);
    if (tmp != -1) return tmp;
    return mid;
  } else
    return binsrc(sts, stt, low, mid - 1);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int i, j;
  mod_p[0] = 1;
  inv_mod_p[0] = 1;
  long long tmp = inverse(101, 1000000007);
  for (i = 1; i < N; i++) {
    mod_p[i] = 101 * mod_p[i - 1];
    inv_mod_p[i] = tmp * inv_mod_p[i - 1];
    if (mod_p[i] >= 1000000007) mod_p[i] %= 1000000007;
    if (inv_mod_p[i] >= 1000000007) inv_mod_p[i] %= 1000000007;
  }
  cin >> n >> s >> m >> t >> x;
  long long cur = 0;
  for (i = 0; i < n; i++) {
    long long tmp = (s[i] - 'a') * mod_p[i];
    if (tmp >= 1000000007) tmp %= 1000000007;
    cur += tmp;
    if (cur >= 1000000007) cur %= 1000000007;
    prefix[0][i] = cur;
  }
  cur = 0;
  for (i = 0; i < m; i++) {
    long long tmp = (t[i] - 'a') * mod_p[i];
    if (tmp >= 1000000007) tmp %= 1000000007;
    cur += tmp;
    if (cur >= 1000000007) cur %= 1000000007;
    prefix[1][i] = cur;
  }
  for (i = 0; i < N; i++)
    for (j = 0; j < 31; j++) dp[i][j] = -1;
  for (i = 0; i < N; i++) dp[i][0] = 0;
  int ans = 32;
  for (i = 0; i < n; i++) {
    for (j = 0; j < x; j++) {
      if (dp[i][j] == -1) continue;
      dp[i + 1][j] = max(dp[i][j], dp[i + 1][j]);
      int len = binsrc(i, dp[i][j], 1, n);
      if (len != -1) {
        dp[i + len][j + 1] = max(dp[i + len][j + 1], dp[i][j] + len);
      }
    }
  }
  for (i = 0; i <= n; i++) {
    for (j = 0; j <= x; j++) {
      if (dp[i][j] == m) {
        ans = min(ans, j);
      }
    }
  }
  if (ans == 32)
    cout << "NO";
  else
    cout << "YES";
}
