#include <bits/stdc++.h>
using namespace std;
void addmod(int &a, long long b) {
  a = (a + b);
  if (a >= 1000000007) a -= 1000000007;
}
void mulmod(int &a, long long b) { a = (a * b) % 1000000007; }
template <class T>
bool domin(T &a, const T &b) {
  return a > b ? a = b, 1 : 0;
}
template <class T>
bool domax(T &a, const T &b) {
  return a < b ? a = b, 1 : 0;
}
int gi() {
  int a;
  scanf("%d", &a);
  return a;
}
long long gll() {
  long long a;
  scanf("%lld", &a);
  return a;
}
int pw[2][100007];
struct mhash {
  static int md[2];
  const long long b[2] = {31, 29};
  static bool done;
  pair<long long, long long> h;
  vector<int> vh[2];
  int re[2];
  int len;
  mhash() : h({0, 0}), len(0) {
    if (!done) {
      calcpw();
    }
  }
  mhash(char *st) {
    if (!done) {
      calcpw();
    }
    len = strlen(st);
    vh[0].assign(len + 1, 0);
    vh[1].assign(len + 1, 0);
    for (int i = 1; i <= len; i++) {
      for (int j = 0; j < 2; j++) {
        vh[j][i] = (vh[j][i - 1] * b[j] + st[i - 1] - 'a') % md[j];
      }
    }
  }
  long long geth(int l, int r) {
    for (int i = 0; i < 2; i++) {
      re[i] = (vh[i][r] - (long long)vh[i][l - 1] * pw[i][r - l + 1]) % md[i];
      if (re[i] < 0) re[i] += md[i];
    }
    return (((long long)re[0] << 30) | re[1]);
  }
  void reset() { h.first = h.second = len = 0; }
  void merge(char c) {
    h.first = (b[0] * h.first + (c - 'a') + 1) % md[0];
    h.second = (b[1] * h.second + (c - 'a') + 1) % md[1];
    len++;
  }
  void merge(const mhash &o) {
    if (o.len == 0) return;
    h.first = (h.first * pw[0][o.len] + o.h.first) % md[0];
    h.second = (h.second * pw[1][o.len] + o.h.second) % md[1];
    len += o.len;
    assert(len < 100007);
  }
  long long geth() {
    long long ret = h.first;
    ret <<= 30;
    return (ret | h.second);
  }
  bool isPrime(int x) {
    for (int i = 2; i * i <= x; i++) {
      if (x % i == 0) return 0;
    }
    return 1;
  }
  void calcpw() {
    done = true;
    for (int i = 1e9 + 24, j = 0; j < 2; i++) {
      if ((rand() & 7) == 0 && isPrime(i)) {
        md[j] = i;
        j++;
      }
    }
    pw[0][0] = 1;
    pw[1][0] = 1;
    for (int i = 1; i < 100007; i++) {
      pw[0][i] = (pw[0][i - 1] * b[0]) % md[0];
      pw[1][i] = (pw[1][i - 1] * b[1]) % md[1];
    }
  }
  mhash &operator=(const mhash &o) {
    h.first = o.h.first;
    h.second = o.h.second;
    len = o.len;
    return *this;
  }
  bool operator<(const mhash &o) const {
    if (h.first != o.h.first) return h.first < o.h.first;
    return h.second < o.h.second;
  }
  bool operator==(const mhash &o) const {
    return h.first == o.h.first && h.second == o.h.second;
  }
};
bool mhash::done = false;
int mhash::md[2] = {0, 0};
int main() {
  int n = gi();
  char *s, *t;
  s = new char[100007];
  t = new char[100007];
  scanf(" %s", s);
  int m = gi();
  scanf(" %s", t);
  int x = gi();
  assert(m == strlen(t));
  assert(n == strlen(s));
  mhash hs(s), ht(t);
  vector<vector<int> > ix(n + 5, vector<int>(x + 5, 0));
  bool ok = false;
  for (int i = 1; i <= n; i++)
    for (int fx = 1; fx <= x; fx++) {
      domax(ix[i][fx], ix[i - 1][fx]);
      int tx = ix[i - 1][fx - 1] + 1;
      int lo = 0, hi = (m - tx + 1), md;
      if (hi + i > n + 1) continue;
      while (lo < hi) {
        md = (lo + hi + 1) / 2;
        if (hs.geth(i, i + md - 1) == ht.geth(tx, tx + md - 1))
          lo = md;
        else
          hi = md - 1;
      }
      domax(ix[i + lo - 1][fx], tx + lo - 1);
      if (tx + lo - 1 == m) ok = true;
    }
  if (ok)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
