#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx")
using std::abs;
using std::cerr;
using std::cin;
using std::cout;
using std::map;
using std::max;
using std::min;
using std::pair;
using std::set;
using std::string;
using std::swap;
using std::vector;
using ll = long long;
using uint = unsigned int;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template <typename T>
void _dbg(const char* _s, T _h) {
  cerr << _s << " = " << _h << "\n";
}
template <typename T, typename... Ts>
void _dbg(const char* _s, T _h, Ts... _t) {
  int _b = 0;
  while (((_b += *_s == '(') -= *_s == ')') != 0 || *_s != ',') cerr << *_s++;
  cerr << " = " << _h << ",";
  _dbg(_s + 1, _t...);
}
struct init {
  init() {
    cin.tie(0);
    std::iostream::sync_with_stdio(0);
    cout << std::fixed << std::setprecision(10);
    cerr << std::fixed << std::setprecision(5);
  }
  ~init() {}
} init;
const int MAXN = 1e5 + 5;
int dp[MAXN][33];
const int MAXMOD = 2;
const ll MOD[MAXMOD] = {1000000007, 1000000009};
const ll BASE[MAXMOD] = {29, 31};
ll pw[MAXMOD][MAXN];
struct hash_init {
  hash_init() {
    for (int j = 0; j < MAXMOD; ++j) {
      pw[j][0] = 1;
      for (int i = 1; i < MAXN; ++i)
        pw[j][i] = (pw[j][i - 1] * BASE[j]) % MOD[j];
    }
  }
} hash_init;
struct hash_string {
  string s;
  vector<int> hash[MAXMOD];
  ll get(int num, int l, int r) {
    return (hash[num][r] - hash[num][l - 1] + MOD[num]) % MOD[num];
  }
  char operator[](int i) const { return s[i]; }
  void build() {
    s = "#" + s;
    for (int j = 0; j < MAXMOD; ++j) {
      hash[j].assign(s.size(), 0);
      for (uint i = 1; i < s.size(); ++i)
        hash[j][i] = (hash[j][i - 1] + pw[j][i] * (s[i] - 'a' + 1)) % MOD[j];
    }
  }
  hash_string() {}
  hash_string(const string& _s) : s(_s) { build(); }
};
bool equal(hash_string& s1, int l1, int r1, hash_string& s2, int l2, int r2) {
  if (l1 <= l2) {
    for (int i = 0; i < MAXMOD; ++i)
      if (s2.get(i, l2, r2) != (s1.get(i, l1, r1) * pw[i][l2 - l1]) % MOD[i])
        return false;
    return true;
  } else {
    for (int i = 0; i < MAXMOD; ++i)
      if (s1.get(i, l1, r1) != (s2.get(i, l2, r2) * pw[i][l1 - l2]) % MOD[i])
        return false;
    return true;
  }
}
int lcp(hash_string& s1, int l1, int r1, hash_string& s2, int l2, int r2) {
  if (s1[l1] != s2[l2]) return 0;
  if (equal(s1, l1, r1, s2, l2, r2)) return (r1 - l1 + 1);
  int l = 0, r = min(r2 - l2, r1 - l1) + 1;
  while (r - l > 1) {
    int m = r + l >> 1;
    if (equal(s1, l1, l1 + m, s2, l2, l2 + m))
      l = m;
    else
      r = m;
  }
  return l + 1;
}
std::istream& operator>>(std::istream& is, hash_string& s) {
  auto& t = (is >> s.s);
  s.build();
  return t;
}
void upx(int& x, int y) {
  if (x < y) x = y;
}
template <typename T>
void hash_combine(std::size_t& seed, T const& key) {
  std::hash<T> hasher;
  seed ^= hasher(key) + 0x9e3779b9 + (seed << 6) ^ (seed >> 2);
}
namespace std {
template <typename T1, typename T2>
struct hash<std::pair<T1, T2>> {
  std::size_t operator()(std::pair<T1, T2> const& p) const {
    std::size_t seed(0);
    ::hash_combine(seed, p.first);
    ::hash_combine(seed, p.second);
    return seed;
  }
};
}  // namespace std
std::unordered_map<pii, int> used;
int getlcp(hash_string& s1, int l1, int r1, hash_string& s2, int l2, int r2) {
  pii p{l1, l2};
  if (!used.count(p)) {
    used[p] = lcp(s1, l1, r1, s2, l2, r2);
  }
  return used[p];
}
int main() {
  hash_string s, t;
  int n, m, x;
  cin >> n >> s >> m >> t >> x;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j <= x; ++j) {
      upx(dp[i + 1][j], dp[i][j]);
      int we = getlcp(s, i + 1, n, t, dp[i][j] + 1, m);
      upx(dp[i + we][j + 1], dp[i][j] + we);
    }
  }
  for (int i = 1; i <= n; ++i)
    for (int j = 0; j <= x; ++j)
      ;
  string ans = "NO\n";
  for (int j = x; j >= 0; --j)
    if (dp[n][j] == m) ans = "YES\n";
  cout << ans;
  return 0;
}
