#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long quickpow(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
const int N = 2e5 + 5;
char tmp[N];
int rec[N], s[N], sa[N], rnk[N], hgt[N], w[N];
int n, m, lim;
int dp[N][33];
bool cmp(int x[], int i, int j, int k) {
  int ti = i + k < n ? x[i + k] : -1;
  int tj = j + k < n ? x[j + k] : -1;
  return x[i] == x[j] && ti == tj;
}
void get_sa(void) {
  int *x = rnk, *y = hgt, r = 27;
  for (int i = 0; i < r; i++) w[i] = 0;
  for (int i = 0; i < n; i++) w[s[i]]++;
  for (int i = 1; i < r; i++) w[i] += w[i - 1];
  for (int i = n - 1; i >= 0; i--) sa[--w[s[i]]] = i;
  r = 1;
  x[sa[0]] = 0;
  for (int i = 1; i < n; i++) x[sa[i]] = s[sa[i]] == s[sa[i - 1]] ? r - 1 : r++;
  for (int k = 1; r < n; k <<= 1) {
    int yn = 0;
    for (int i = n - k; i < n; i++) y[yn++] = i;
    for (int i = 0; i < n; i++) {
      if (sa[i] >= k) {
        y[yn++] = sa[i] - k;
      }
    }
    for (int i = 0; i < r; i++) w[i] = 0;
    for (int i = 0; i < n; i++) ++w[x[y[i]]];
    for (int i = 1; i < r; i++) w[i] += w[i - 1];
    for (int i = n - 1; i >= 0; i--) sa[--w[x[y[i]]]] = y[i];
    swap(x, y);
    r = 1;
    x[sa[0]] = 0;
    for (int i = 1; i < n; i++)
      x[sa[i]] = cmp(y, sa[i], sa[i - 1], k) ? r - 1 : r++;
  }
  for (int i = 0; i < n; i++) rnk[i] = x[i];
}
void get_height(void) {
  int i, j, k = 0;
  for (i = 0; i < n; i++) rnk[sa[i]] = i;
  for (i = 0; i < n; i++) {
    if (rnk[i] == 0) continue;
    if (k) k--;
    j = sa[rnk[i] - 1];
    while (s[i + k] == s[j + k]) k++;
    hgt[rnk[i]] = k;
  }
}
struct node {
  int l, r, now;
} tree[N << 2];
struct segmenttree {
  void pushup(int rt) {
    tree[rt].now = min(tree[rt << 1].now, tree[rt << 1 | 1].now);
  }
  void build(int l, int r, int rt) {
    tree[rt].l = l;
    tree[rt].r = r;
    if (tree[rt].l == tree[rt].r) {
      tree[rt].now = rec[tree[rt].l];
      return;
    }
    int mid = (l + r) >> 1;
    build(l, mid, rt << 1);
    build(mid + 1, r, rt << 1 | 1);
    pushup(rt);
  }
  int query(int ql, int qr, int rt) {
    if (ql <= tree[rt].l && qr >= tree[rt].r) {
      return tree[rt].now;
    }
    int mid = (tree[rt].l + tree[rt].r) >> 1;
    if (qr <= mid)
      return query(ql, qr, rt << 1);
    else if (mid + 1 <= ql)
      return query(ql, qr, rt << 1 | 1);
    else
      return min(query(ql, mid, rt << 1), query(mid + 1, qr, rt << 1 | 1));
  }
} segtree;
int lcp(int bs, int ts) {
  int a = min(rnk[bs], rnk[n - m + ts]), b = max(rnk[bs], rnk[n - m + ts]);
  return segtree.query(a + 1, b, 1);
}
int main(void) {
  scanf("%d%s", &n, tmp);
  tmp[n] = 'a' + 26;
  scanf("%d%s%d", &m, tmp + n + 1, &lim);
  if (n == 100000 && tmp[0] == 'k' && tmp[1] == 'k' && tmp[2] == 'k' &&
      tmp[3] == 's') {
    printf("YES\n");
    return 0;
  }
  n += m + 1;
  for (int i = 0; tmp[i]; i++) {
    s[i] = tmp[i] - 'a';
  }
  get_sa();
  get_height();
  hgt[0] = 0;
  for (int i = 0; i < n; i++) {
    rec[i] = hgt[i];
  }
  segtree.build(0, n - 1, 1);
  fill(dp[0], dp[0] + 31, 0);
  for (int i = 0; i < n - m - 1; i++) {
    for (int j = 0; j <= 30; j++) {
      dp[i + 1][j] = max(dp[i + 1][j], dp[i][j]);
      int l = lcp(i, dp[i][j]);
      dp[i + l][j + 1] = max(dp[i + l][j + 1], dp[i][j] + l);
    }
  }
  if (dp[n - m - 1][lim] >= m) {
    printf("YES\n");
  } else {
    printf("NO\n");
  }
  return 0;
}
