#include <bits/stdc++.h>
using namespace std;
struct str_hash {
  vector<int> h1, h2, b1, b2;
  const static int BASE = 37, M1 = 1e9 + 7, M2 = 1e9 + 9;
  str_hash() {}
  str_hash(const string& s)
      : h1(s.size() + 1),
        h2(s.size() + 1),
        b1(s.size() + 1, 1),
        b2(s.size() + 1, 1) {
    for (int i = 0; i < s.size(); ++i) {
      h1[i + 1] = (1LL * h1[i] * BASE + s[i] - 'a' + 1) % M1;
      h2[i + 1] = (1LL * h2[i] * BASE + s[i] - 'a' + 1) % M2;
      b1[i + 1] = (1LL * b1[i] * BASE) % M1;
      b2[i + 1] = (1LL * b2[i] * BASE) % M2;
    }
  }
  long long hash(int i, int j) {
    long long r1 = (h1[j + 1] - 1LL * h1[i] * b1[j - i + 1]) % M1;
    long long r2 = (h2[j + 1] - 1LL * h2[i] * b2[j - i + 1]) % M2;
    return ((r1 < 0) ? r1 + M1 : r1) ^ ((r2 < 0) ? r2 + M2 : r2) << 32;
  }
};
const int N = 1e5 + 5;
int dp[N][33];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, m, x;
  string s, t;
  cin >> n >> s >> m >> t >> x;
  str_hash S(s), T(t);
  for (int i = 0; i <= n; ++i) {
    for (int r = 0; r <= x; ++r) {
      if (dp[i][r] == m) {
        cout << "YES\n";
        return 0;
      }
      dp[i + 1][r] = max(dp[i + 1][r], dp[i][r]);
      int lo = 0, hi = min(t.size() - dp[i][r], s.size() - i);
      int j = dp[i][r];
      if (j == m || i == n || s[i] != t[j]) continue;
      while (hi - lo > 1) {
        int md = (lo + hi) / 2;
        if (S.hash(i, i + md) == T.hash(j, j + md))
          lo = md;
        else
          hi = md;
      }
      dp[i + hi][r + 1] = max(dp[i + hi][r + 1], j + hi);
    }
  }
  cout << "NO\n";
}
