#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;

#define fi first
#define se second
#define repl(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define rep(i,n) repl(i,0,n)
#define all(x) (x).begin(),(x).end()
#define dbg(x) cout<<#x"="<<x<<endl
#define mmax(x,y) (x>y?x:y)
#define mmin(x,y) (x<y?x:y)
#define maxch(x,y) x=mmax(x,y)
#define minch(x,y) x=mmin(x,y)
#define uni(x) x.erase(unique(all(x)),x.end())
#define exist(x,y) (find(all(x),y)!=x.end())
#define bcnt __builtin_popcountll

#define INF 1e16
#define mod 1000000007

vector<int> construct_sa(const string& S){
  vector<int> SA, ranks, tmp;
  int N = S.length();

  SA.resize(N + 1);
  ranks.resize(N + 1);
  tmp.resize(N + 1);

  for(int i = 0; i <= N; i++){
    SA[i] = i;
    ranks[i] = (i < N ? S[i] : -1);
  }

  for(int k = 1; k <= N; k *= 2){
    auto f = [&](const int& a,const int& b){
      if(ranks[a] != ranks[b]) return ranks[a] < ranks[b];
      else{
        int ra = (a + k <= N ? ranks[a + k] : -1);
        int rb = (b + k <= N ? ranks[b + k] : -1);
        return ra < rb;
      }
    };

    sort(SA.begin(), SA.end(), f);

    tmp[SA[0]] = 0;
    for(int i = 1; i <= N; i++){
      tmp[SA[i]] = tmp[SA[i-1]] + (f(SA[i-1], SA[i]) ? 1 : 0);
    }
    for(int i = 0; i <= N; i++){
      ranks[i] = tmp[i];
    }
  }
  return SA;
}

vector<int> construct_lcp(const string& S, const vector<int>& SA){
  int N = S.length();
  vector<int> LCP(N + 1), ranks(N + 1);

  for(int i = 0; i <= N; i++){
    ranks[SA[i]] = i;
  }

  int h = 0;
  LCP[0] = 0;
  for(int i = 0; i < N; i++){
    int j = SA[ranks[i] - 1];

    if(h > 0) h--;
    while(j + h < N && i + h < N){
      if(S[j + h] != S[i + h]) break;
      h++;
    }
    int index = ranks[i] - 1;
    LCP[ranks[i] - 1] = h;
  }
  return LCP;
}

struct RangeMaxQuery{
  ll dat[(1<<21)-1];
  int size;

  void init(int n_){
    size=1;
    while(size<n_) size*=2;
    for(int i=0;i<2*size-1;i++)dat[i]=0;
  }

  void update(int k,ll a){
    k+=size-1;
    dat[k]=a;
    while(k>0){
      k=(k-1)/2;
      dat[k]=max(dat[k*2+1],dat[k*2+2]);
    }
  }

  ll subquery(int a,int b,int k,int l,int r){
    if(r<=a||b<=l)return 0;
    if(a<=l&&r<=b)return dat[k];
    else{
      return max(subquery(a,b,k*2+1,l,(l+r)/2),subquery(a,b,k*2+2,(l+r)/2,r));
    }
  }
  
  ll query(int a,int b){
    return subquery(a,b,0,0,size);
  }
};

RangeMaxQuery sgt;

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);

  string S,T;
  int K;
  cin>>S>>T>>K;
  int N=S.size();
  string A=S+"$"+T;

  vector<int> SA=construct_sa(A);
  vector<int> lcp=construct_lcp(A,SA);

  int M=A.size();
  vector<int> nxt(N,0);
  int crtmn=0;
  rep(i,M+1){
    if(SA[i]<N){
      maxch(nxt[SA[i]],crtmn);
      if(i<M)minch(crtmn,lcp[i]);
    }else if(SA[i]>N){
      if(i<M)crtmn=lcp[i];
    }
  }

  crtmn=0;
  for(ll i=M-1;i>=0;i--){
    if(SA[i]<N){
      maxch(nxt[SA[i]],crtmn);
      if(i-1>=0)minch(crtmn,lcp[i-1]);
    }else if(SA[i]>N){
      if(i-1>=0)crtmn=lcp[i-1];
    }
  }

  vector<bool> dp(N+1,false);
  dp[N]=true;
  sgt.init(N+1);
  sgt.update(N,1);
  for(ll i=N-1;i>=0;i--){
    if(K>nxt[i])continue;
    ll f=sgt.query(min((ll)N,i+K),min((ll)N+1,i+nxt[i]+1));
    if(f>0)dp[i]=true;
    sgt.update(i,dp[i]);
  }
  if(dp[0])cout<<"Yes"<<endl;
  else cout<<"No"<<endl;

  return 0;
}



Measured memory_bytes: 12400