#include <bits/stdc++.h>
const long long INF = (long long)1e18 + 123;
const int inf = (int)2e9 + 123;
const int mod = 1e9 + 7;
using namespace std;
int P = 91;
int dp[100011][31];
int h[3][100011], x;
long long pw[100011];
string s, t;
int get(int type, int length, int l, int r) {
  return (h[type][r] - (h[type][l - 1] * pw[length]) % mod + mod) % mod;
}
int main() {
  unsigned int FOR;
  asm("rdtsc" : "=A"(FOR));
  srand(FOR);
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int y;
  cin >> y >> s >> y >> t >> x;
  pw[0] = 1;
  s = '#' + s;
  t = '#' + t;
  for (int i = 1; i <= (int)s.length(); i++) {
    pw[i] = (pw[i - 1] * P) % mod;
  }
  for (int i = 1; i < s.length(); i++) {
    h[1][i] = (1ll * (h[1][i - 1] + (int)s[i]) * P) % mod;
  }
  for (int i = 1; i < t.length(); i++) {
    h[2][i] = (1ll * (h[2][i - 1] + (int)t[i]) * P) % mod;
  }
  for (int i = 1; i < s.length(); i++) {
    for (int j = 0; j < x; j++) {
      dp[i][j] = max(dp[i - 1][j], dp[i][j]);
      if (dp[i][j] >= t.length()) continue;
      int l = dp[i][j] + 1, r = t.length() - 1, mx = dp[i][j],
          st = dp[i][j] + 1;
      while (l <= r) {
        int mid = (l + r) / 2;
        if (get(1, mid - dp[i][j], i, i + mid - dp[i][j] - 1) ==
            get(2, mid - dp[i][j], dp[i][j] + 1, mid)) {
          mx = max(mx, mid);
          l = mid + 1;
        } else
          r = mid - 1;
      }
      if (mx > dp[i][j])
        dp[i + mx - dp[i][j] + 1][j + 1] =
            max(dp[i + mx - dp[i][j] + 1][j + 1], mx);
    }
  }
  int mxx = 0;
  for (int i = 1; i <= s.length() + 1; i++) {
    for (int j = 0; j <= x; j++) {
      if (dp[i][j] == t.length() - 1) {
        cout << "YES";
        return 0;
      }
      mxx = max(mxx, dp[i][j]);
    }
  }
  cout << "NO";
  return 0;
}
