#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
const int MAXN = 1e5 + 10;
const int P = 37;
int dp[MAXN][32];
char a[MAXN], b[MAXN];
unsigned long long Hasha[MAXN], Hashb[MAXN], mul[MAXN];
inline void doHash(unsigned long long Hash[], int n, char s[]) {
  for (register int i = (1); i <= (n); ++i) {
    Hash[i] = Hash[i - 1] * P + s[i] - 'a';
  }
}
inline unsigned long long getHash(unsigned long long Hash[], int l, int r) {
  return Hash[r] - Hash[l - 1] * mul[r - l + 1];
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL), cout.tie(NULL);
  int n, m, c;
  cin >> n >> (a + 1);
  cin >> m >> (b + 1);
  cin >> c;
  mul[0] = 1;
  for (register int i = (1); i <= (n); ++i) {
    mul[i] = mul[i - 1] * P;
  }
  doHash(Hasha, n, a);
  doHash(Hashb, m, b);
  memset(dp, -1, sizeof(dp));
  dp[0][0] = 0;
  for (register int i = (0); i <= (n - 1); ++i) {
    for (register int j = (0); j <= (c); ++j)
      if (~dp[i][j]) {
        dp[i + 1][j] = max(dp[i][j], dp[i + 1][j]);
        if (j != c)
          if (a[i + 1] == b[dp[i][j] + 1]) {
            int L = 1, R = min(n - i, m - dp[i][j]);
            while (L <= R) {
              int mid = (L + R) >> 1;
              if (getHash(Hasha, i + 1, i + mid) ==
                  getHash(Hashb, dp[i][j] + 1, dp[i][j] + mid)) {
                L = mid + 1;
              } else
                R = mid - 1;
            }
            --L;
            dp[i + L][j + 1] = max(dp[i + L][j + 1], dp[i][j] + L);
          }
      }
  }
  for (register int i = (0); i <= (c); ++i) {
    if (dp[n][i] == m) {
      cout << "YES" << '\n';
      return 0;
    }
  }
  cout << "NO" << '\n';
  return 0;
}
