#include <bits/stdc++.h>
using namespace std;
int n, m, x;
char str[2][100010];
pair<int, int> cnt[31];
int cou;
long long hash1[2][100010], hash2[2][100010];
long long power[200010];
const int mod = 1000000007;
const int hash_key = 13131;
int main() {
  while (~scanf("%d%s%d%s%d", &n, str[0], &m, &str[1], &x)) {
    power[0] = 1;
    for (int i = 1; i <= 2 * n; i++) {
      power[i] = (power[i - 1] * hash_key) % mod;
    }
    for (int i = 0; i < n; i++) {
      hash1[0][i] = (hash1[0][i - 1] + (str[0][i] - 'a') * power[i]) % mod;
      hash1[1][i] = (hash1[1][i - 1] +
                     (str[0][i] - 'a') * (str[0][i] - 'a') * power[i * 2]) %
                    mod;
    }
    for (int i = 0; i < m; i++) {
      hash2[0][i] = (hash2[0][i - 1] + (str[1][i] - 'a') * power[i]) % mod;
      hash2[1][i] = (hash2[1][i - 1] +
                     (str[1][i] - 'a') * (str[1][i] - 'a') * power[i * 2]) %
                    mod;
    }
    cou = 0;
    memset(cnt, 0, sizeof(cnt));
    for (int i = 0; i < n; i++) {
      for (int j = min(x - 1, cou); j >= 0; j--) {
        int s = cnt[j].first;
        if (i < cnt[j].second) {
          continue;
        }
        if (m - s + i > n) {
          continue;
        }
        int cc = 0;
        if (j != cou) {
          int dis = cnt[j + 1].first - s;
          if (dis > 0) {
            long long num[2];
            if (i != 0) {
              num[0] = (hash1[0][i + dis - 1] - hash1[0][i - 1] + mod) % mod;
              num[1] = (hash1[1][i + dis - 1] - hash1[1][i - 1] + mod) % mod;
            } else {
              num[0] = hash1[0][i + dis - 1];
              num[1] = hash1[1][i + dis - 1];
            }
            long long num1[2];
            if (s != 0) {
              num1[0] = (hash2[0][s + dis - 1] - hash2[0][s - 1] + mod) % mod *
                        power[i - s] % mod;
              num1[1] = (hash2[1][s + dis - 1] - hash2[1][s - 1] + mod) % mod *
                        power[2 * (i - s)] % mod;
            } else {
              num1[0] = hash2[0][s + dis - 1] * power[i - s] % mod;
              num1[1] = hash2[1][s + dis - 1] * power[2 * (i - s)] % mod;
            }
            if (num[0] != num1[0] || num[1] != num1[1]) {
              continue;
            }
            cc = dis;
          }
        }
        for (int k = s + cc, r = cc; k < m; k++, r++) {
          if (str[0][i + r] == str[1][k]) {
            cc++;
          } else {
            break;
          }
        }
        int e = s + cc;
        if (cc == 0) {
          continue;
        }
        if (e == m) {
          cnt[j + 1].first = e;
          goto ed;
        }
        if (cnt[j + 1].first < e) {
          cnt[j + 1].first = e;
          cnt[j + 1].second = i + cc;
          if (j == cou) {
            cou++;
          }
        }
      }
    }
  ed:
    int flag = 0;
    for (int i = 0; i <= x; i++) {
      if (cnt[i].first == m) {
        flag = 1;
        break;
      }
    }
    if (flag) {
      puts("YES");
    } else {
      puts("NO");
    }
  }
  return 0;
}
