#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
inline long long getint() {
  long long _x = 0, _tmp = 1;
  char _tc = getchar();
  while ((_tc < '0' || _tc > '9') && _tc != '-') _tc = getchar();
  if (_tc == '-') _tc = getchar(), _tmp = -1;
  while (_tc >= '0' && _tc <= '9') _x *= 10, _x += (_tc - '0'), _tc = getchar();
  return _x * _tmp;
}
inline long long add(long long _x, long long _y,
                     long long _mod = 1000000007LL) {
  _x += _y;
  return _x >= _mod ? _x - _mod : _x;
}
inline long long sub(long long _x, long long _y,
                     long long _mod = 1000000007LL) {
  _x -= _y;
  return _x < 0 ? _x + _mod : _x;
}
inline long long mul(long long _x, long long _y,
                     long long _mod = 1000000007LL) {
  _x *= _y;
  return _x >= _mod ? _x % _mod : _x;
}
long long mypow(long long _a, long long _x, long long _mod) {
  if (_x == 0) return 1LL;
  long long _ret = mypow(mul(_a, _a, _mod), _x >> 1, _mod);
  if (_x & 1) _ret = mul(_ret, _a, _mod);
  return _ret;
}
long long mymul(long long _a, long long _x, long long _mod) {
  if (_x == 0) return 0LL;
  long long _ret = mymul(add(_a, _a, _mod), _x >> 1, _mod);
  if (_x & 1) _ret = add(_ret, _a, _mod);
  return _ret;
}
inline bool equal(double _x, double _y) {
  return _x > _y - 1e-9 && _x < _y + 1e-9;
}
int __ = 1, _cs;
pair<int, int> operator*(const pair<int, int>& p1, const pair<int, int>& p2) {
  return {mul(p1.first, p2.first, 1000000007LL),
          mul(p1.second, p2.second, 1000000009LL)};
}
pair<int, int> operator+(const pair<int, int>& p1, const pair<int, int>& p2) {
  return {add(p1.first, p2.first, 1000000007LL),
          add(p1.second, p2.second, 1000000009LL)};
}
pair<int, int> operator-(const pair<int, int>& p1, const pair<int, int>& p2) {
  return {sub(p1.first, p2.first, 1000000007LL),
          sub(p1.second, p2.second, 1000000009LL)};
}
bool operator==(const pair<int, int>& p1, const pair<int, int>& p2) {
  return p1.first == p2.first and p1.second == p2.second;
}
struct Hash {
  pair<int, int> hsh[101010];
  pair<int, int> bs[101010];
  int len;
  void build(char* c) {
    len = strlen(c);
    bs[0] = {1, 1};
    pair<int, int> bb = {13331, 13331};
    for (int i = 1; i <= len; i++) bs[i] = bs[i - 1] * bb;
    hsh[0] = {0, 0};
    for (int i = 1; i <= len; i++)
      hsh[i] = (hsh[i - 1] * bb) + make_pair(c[i - 1], c[i - 1]);
  }
  pair<int, int> hs_vl(int l, int r) {
    return hsh[r] - (hsh[l - 1] * bs[r - l + 1]);
  }
} hs, ht;
void build() {}
char s[101010], t[101010];
int n, m, x;
void init() {
  n = getint();
  scanf("%s", s);
  m = getint();
  scanf("%s", t);
  x = getint();
  hs.build(s);
  ht.build(t);
}
int dp[101010][32];
void solve() {
  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]);
      if (dp[i][j] == m) {
        puts("YES");
        exit(0);
      }
      if (j == x) continue;
      int bl = 1, br = min(m - dp[i][j], n - i), ba = -1;
      while (bl <= br) {
        int bmid = (bl + br) >> 1;
        pair<int, int> hss = hs.hs_vl(i + 1, i + bmid);
        pair<int, int> hst = ht.hs_vl(dp[i][j] + 1, dp[i][j] + bmid);
        if (hss == hst)
          ba = bmid, bl = bmid + 1;
        else
          br = bmid - 1;
      }
      if (ba == -1) continue;
      dp[i + ba][j + 1] = max(dp[i + ba][j + 1], dp[i][j] + ba);
    }
  for (int i = 1; i <= n; i++)
    for (int j = 0; j <= x; j++)
      if (dp[i][j] == m) {
        puts("YES");
        exit(0);
      }
  puts("NO");
}
int main() {
  build();
  while (__--) {
    init();
    solve();
  }
}
