#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
const int maxn = 1e5 + 5;
const int maxx = 35;
int n, m, x;
int dp[maxn][maxx];
char s[maxn], t[maxn];
unsigned long long qpow(long long x, unsigned long long y,
                        unsigned long long M) {
  unsigned long long ret = 1;
  for (; y; y >>= 1) {
    if (y & 1) (ret *= x) %= M;
    (x *= x) %= M;
  }
  return ret;
}
class Hash {
 private:
  unsigned long long p[maxn], h[maxn], inv[maxn];

 public:
  unsigned long long P, M;
  void init(char *str, int len) {
    p[0] = inv[0] = 1;
    for (int i = (1); i <= (len); ++i) {
      h[i] = (h[i - 1] * P % M + (str[i] - 'a')) % M;
      p[i] = p[i - 1] * P % M;
    }
    return;
  }
  inline unsigned long long get(int l, int r) {
    return ((h[r] - h[l - 1] * p[r - l + 1] % M + M) % M);
  }
} hs1, hs2, ht1, ht2;
void precalc() {
  hs1.P = ht1.P = 31;
  hs1.M = ht1.M = 19260817;
  hs2.P = ht2.P = 998244353;
  hs2.M = ht2.M = 1e9 + 7;
  hs1.init(s, n);
  hs2.init(s, n);
  ht1.init(t, m);
  ht2.init(t, m);
  return;
}
inline bool check(int x, int y, int len) {
  if (x + len - 1 > n || y + len - 1 > m) return false;
  pair<unsigned long long, unsigned long long> res1 = make_pair(
                                                   hs1.get(x, x + len - 1),
                                                   hs2.get(x, x + len - 1)),
                                               res2 = make_pair(
                                                   ht1.get(y, y + len - 1),
                                                   ht2.get(y, y + len - 1));
  return res1 == res2;
}
int main() {
  scanf("%d", &n);
  scanf("%s", s + 1);
  scanf("%d", &m);
  scanf("%s", t + 1);
  scanf("%d", &x);
  precalc();
  dp[0][0] = 0;
  for (int i = (0); i < (n); ++i)
    for (int j = (0); j <= (x); ++j) {
      dp[i + 1][j] = max(dp[i + 1][j], dp[i][j]);
      int lb, rb;
      for (lb = 0, rb = m + 1; lb + 1 < rb;) {
        int md = lb + rb >> 1;
        if (check(i + 1, dp[i][j] + 1, md))
          lb = md;
        else
          rb = md;
      }
      if (lb && j + 1 <= x) {
        dp[i + lb][j + 1] = max(dp[i + lb][j + 1], dp[i][j] + lb);
      }
    }
  for (int j = (0); j <= (x); ++j)
    if (dp[n][j] >= m) {
      puts("YES");
      return 0;
    }
  puts("NO");
  return 0;
}
