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;
typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;
typedef long double LD;
typedef pair<LD, int> PLDI;
typedef pair<LD, LD> PLDLD;

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define CLR(a) memset((a), 0 ,sizeof(a))
#define ALL(a) a.begin(),a.end()
const LL MOD = 1e9+7;
const LL INF = (1e18);
const double EPS=1.0e-9;
const double PI=atan2(0,-1);



int main()
{
    int n,m,q;
    cin>>n>>m>>q;
    vector<int> a(q);
    REP(i,q)
        cin>>a[i];
    
    bool used[100001];
    vector<int> b;
    CLR(used);
    b.reserve(q);
    for(int i=q-1;i>=0;i--)
    {
        if(!used[a[i]])
        {
            b.push_back(a[i]);
            used[a[i]]=1;
        }
    }
    REP(i,m)
    {
        if(!used[i+1])
            b.push_back(i+1);
    }
    vector<int> c(m+1);
    REP(i,m)
        c[b[i]]=i+1;
    
    bool flag=1;
    vector<int> d(m+2);
    d[0]=n;
    for(int i=q-1;i>=0;i--)
    {
        d[c[a[i]]-1]--;
        if(d[c[a[i]]-1]<0)
        {
            d[c[a[i]]-1]=0;
            continue;
            //flag=0;
            //break;
        }
        d[c[a[i]]]++;
    }
    
    CLR(used);
    //used[0]=1;
        int k=1;
    REP(i,m+2)
    {
        if(d[i]==0)continue;
        
        for(int j=0;j<i;j++)
            used[b[j]]=1;
        
        FOR(j,i,m)
        {
            if(used[k])
            {
                k++; j--;
                continue;
            }
            if(k!=b[j])
            {
                flag=0;
                break;
            }
            k++;
        }
        
        break;
    }
    
    if(flag)
        cout<<"Yes"<<endl;
    else
        cout<<"No"<<endl;
}