There are N arrays. The length of each array is M and initially each array contains integers (1，2，...，M) in this order.

Mr. Takahashi has decided to perform Q operations on those N arrays. For the i-th (1≤i≤Q) time, he performs the following operation.

* Choose an arbitrary array from the N arrays and move the integer a_i (1≤a_i≤M) to the front of that array. For example, after performing the operation on a_i=2 and the array (5，4，3，2，1), this array becomes (2，5，4，3，1).



Mr. Takahashi wants to make N arrays exactly the same after performing the Q operations. Determine if it is possible or not.

Constraints

* 2≤N≤10^5
* 2≤M≤10^5
* 1≤Q≤10^5
* 1≤a_i≤M

Input

The input is given from Standard Input in the following format:


N M
Q
a_1 a_2 ... a_Q


Output

Print `Yes` if it is possible to make N arrays exactly the same after performing the Q operations. Otherwise, print `No`.

Examples

Input

2 2
3
2 1 2


Output

Yes


Input

3 2
3
2 1 2


Output

No


Input

2 3
3
3 2 1


Output

Yes


Input

3 3
6
1 2 2 3 3 3


Output

No

#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;
}
