#include <bits/stdc++.h>
const int N = 1e5 + 10;
const long long MOD = 1e9 + 7;
using namespace std;
int dp[N][31];
long long hash1[N], hash2[N], POW[N];
string s, t;
int n, m, x;
long long get_hash1(int pos, int len) {
  return (hash1[pos + len] - hash1[pos] * POW[len] + MOD * MOD) % MOD;
}
long long get_hash2(int pos, int len) {
  return (hash2[pos + len] - hash2[pos] * POW[len] + MOD * MOD) % MOD;
}
int solve(int x, int y) {
  int lo = 0, hi = min(s.length() - x, t.length() - y);
  while (lo < hi) {
    int mid = lo + hi + 1 >> 1;
    if (get_hash1(x, mid) == get_hash2(y, mid))
      lo = mid;
    else
      hi = mid - 1;
  }
  return lo;
}
void init() {
  POW[0] = 1;
  for (int i = 1; i < N; i++) POW[i] = (POW[i - 1] * 26) % MOD;
  long long base = 26, z = 1;
  for (int i = 0; i < s.length(); ++i) {
    hash1[i + 1] = (hash1[i] * base + (s[i] - 'a')) % MOD;
  }
  z = 1;
  for (int i = 0; i < t.length(); ++i) {
    hash2[i + 1] = (hash2[i] * base + (t[i] - 'a')) % MOD;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> s >> m >> t >> x;
  init();
  for (int i = 0; i <= s.length(); ++i) {
    for (int j = 0; j <= x; ++j) {
      if (i > 0) dp[i][j] = max(dp[i][j], dp[i - 1][j]);
      if (j > 0) dp[i][j] = max(dp[i][j], dp[i][j - 1]);
      if (i == s.length() || j == x) continue;
      if (dp[i][j] == m) continue;
      if (s[i] != t[dp[i][j]]) continue;
      int ans = solve(i, dp[i][j]);
      dp[i + ans][j + 1] = max(dp[i + ans][j + 1], dp[i][j] + ans);
    }
  }
  cout << (dp[s.length()][x] == m ? "YES" : "NO") << endl;
  return 0;
}
