#include <bits/stdc++.h>
using namespace std;
const int MX = (1 << 18), MXL = 19;
class Suffix_Array {
  string str;

 public:
  int cnt[MX], n;
  void init(string ss) {
    str = " " + ss;
    n = str.size();
  }
  int x[MX], y[MX], sa[MX];
  void count_sort(int lim) {
    for (int j = 0; j <= lim; j++) cnt[j] = 0;
    for (int j = 0; j < n; j++) ++cnt[x[y[j]]];
    for (int j = 1; j <= lim; j++) cnt[j] += cnt[j - 1];
    for (int j = n - 1; j >= 0; j--) sa[--cnt[x[y[j]]]] = y[j];
  }
  void sparse() {
    for (int j = 0; j < n; j++) x[j] = str[j] + 1, y[j] = j;
    int lim = max(n, 300);
    count_sort(lim);
    for (int po = 1; po < n; po <<= 1) {
      int L = 0;
      for (int j = n - po; j < n; j++) y[L++] = j;
      for (int j = 0; j < n; j++)
        if (sa[j] >= po) y[L++] = sa[j] - po;
      count_sort(lim);
      swap(x, y);
      x[sa[0]] = 0;
      L = 1;
      for (int j = 1; j < n; j++) {
        if (y[sa[j - 1]] != y[sa[j]])
          x[sa[j]] = L++;
        else if (y[sa[j - 1] + po] != y[sa[j] + po])
          x[sa[j]] = L++;
        else
          x[sa[j]] = L - 1;
      }
      lim = L;
    }
  }
  int lcp[MX], phi[MX];
  void suffix_array(vector<int> &SA, vector<int> &ret_lcp) {
    SA.clear();
    ret_lcp.clear();
    ret_lcp.resize(n - 1);
    sparse();
    for (int j = 1; j < n; j++) SA.push_back(sa[j] - 1);
    str = str.substr(1, n - 1);
    --n;
    int sz_ = str.size();
    phi[SA[0]] = -1;
    for (int j = 1; j < sz_; j++) phi[SA[j]] = SA[j - 1];
    for (int i = 0, L = 0; i < sz_; i++) {
      if (phi[i] == -1) {
        lcp[i] = 0;
        continue;
      }
      while (str[i + L] == str[phi[i] + L]) ++L;
      lcp[i] = L;
      L = max(L - 1, 0);
    }
    for (int j = 0; j < sz_; j++) ret_lcp[j] = lcp[SA[j]];
  }
} S;
vector<int> SA, lcp;
int sparse[MXL][MX];
int answer(int L, int R) {
  if (L > R) swap(L, R);
  L++;
  int msb = 32 - __builtin_clz(R - L + 1) - 1;
  return min(sparse[msb][L], sparse[msb][R - (1 << msb) + 1]);
}
void hateltable() {
  int n = SA.size();
  for (int j = 0; j < n; j++) sparse[0][j] = lcp[j];
  for (int j = 1; (1 << j) <= n; j++) {
    for (int i = 0; i < n; i++) {
      sparse[j][i] = sparse[j - 1][i];
      if (i + (1 << (j - 1)) < n)
        sparse[j][i] = min(sparse[j][i], sparse[j - 1][i + (1 << (j - 1))]);
    }
  }
}
string big, small, str;
int szbig, szsmall, kk, all;
int dp[32][MX], pos[MX];
int main() {
  cin >> szbig >> big >> szsmall >> small >> kk;
  str = small;
  str.push_back(126);
  str += big;
  S.init(str);
  S.suffix_array(SA, lcp);
  hateltable();
  for (int j = 0; j < SA.size(); j++) {
    pos[SA[j]] = j;
  }
  for (int j = 0; j < SA.size(); j++) {
    pos[SA[j]] = j;
  }
  for (int P = 0; P < kk; P++) {
    for (int j = 0; j < szbig; j++) {
      int matched = dp[P][j];
      if (matched == szsmall) continue;
      dp[P][j + 1] = max(dp[P][j + 1], dp[P][j]);
      int a = pos[matched], b = pos[szsmall + j + 1];
      int mm = answer(a, b);
      int nxt = j + mm;
      if (P == 2) {
      }
      dp[P + 1][nxt] = max(dp[P + 1][nxt], dp[P][j] + mm);
    }
  }
  for (int P = 0; P <= kk; P++)
    for (int j = 0; j <= szbig; j++) {
      if (dp[P][j] == szsmall) {
        puts("YES");
        return 0;
      }
    }
  puts("NO");
}
