
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define i_7 (ll)(1E9+7)
#define i_5 (ll)(1E9+5)
ll mod(ll a){
    ll c=a%i_7;
    if(c>=0)return c;
    else return c+i_7;
}
typedef pair<int,int> i_i;
typedef pair<ll,ll> l_l;
ll inf=(ll)1E12;
#define rep(i,l,r) for(ll i=l;i<=r;i++)
#define pb push_back
ll max(ll a,ll b){if(a<b)return b;else return a;}
ll min(ll a,ll b){if(a>b)return b;else return a;}
void Max(ll * pos,ll val){*pos=max(*pos,val);}//Max(&dp[i][j],dp[i-1][j]);
void Min(ll * pos,ll val){*pos=min(*pos,val);}
void Add(ll * pos,ll val){*pos=mod(*pos+val);}
const long double EPS=1E-8;
////////////////////////////////////////


int main(){
    ll m,n,q;cin>>m>>n>>q;//注意！
    
    ll a[q];
    rep(i,0,q-1){
        cin>>a[i];a[i]--;
    }
    reverse(a,a+q);
    ll ans[n+1];fill(ans,ans+n+1,-1);
    ll anspos=0;
    ll ansc[n+1];memset(ansc,0,sizeof(ansc));
    ll rev[n];fill(rev,rev+n,-1);
    rep(i,0,q-1){
        ll x=a[i];
        if(rev[x]==-1){
            rev[x]=anspos;
            ll y=rev[x];
            ans[y]=x;
            ansc[y]++;
            anspos++;
        }else{
            ll y=rev[x];
            if(y==0)ansc[y]++;
            else if(y>0&&ansc[y-1]>ansc[y])ansc[y]++;
        }
    }
    vector<ll>v;
    ll pos=0;
    while(pos<=n-1&&ansc[pos]>=m){
        pos++;
    }
    while(pos<=n-1&&ans[pos]!=-1){
        v.pb(ans[pos]);
        pos++;
    }
    //for(auto x:v)cout<<x<<" ";cout<<endl;
    rep(i,0,n-1){
        if(rev[i]==-1)v.pb(i);
    }
    ll s=v.size();
    //for(auto x:v)cout<<x<<" ";cout<<endl;
    //cout<<" ans:";rep(i,0,n)cout<<ans[i]<<" ";cout<<endl;
    //cout<<"ansc:";rep(i,0,n)cout<<ansc[i]<<" ";cout<<endl;
    //cout<<" rev:";rep(i,0,n-1)cout<<rev[i]<<" ";cout<<endl;
    rep(i,0,s-2){
        if(v[i]>=v[i+1]){
            cout<<"No"<<endl;
            return 0;
        }
    }
    cout<<"Yes"<<endl;
    
    return 0;
}
