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 <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <string.h>
#include <fstream>

using namespace std;


#define LL long long
#define N 200100
#define M 10000100
#define MP make_pair
#define Pi acos(-1.0)
#pragma comment(linker,"/STACK:1024000000,1024000000")
#define ls (rt << 1)
#define rs (ls | 1)
#define md ((ll+rr)/2)
#define lson ll, md, ls
#define rson md+1, rr, rs
#define mod 1000000007
#define inf 0x3f3f3f3f
#define sqr(x) ((x)*(x))
#define eps 1e-6
#define MP make_pair
#define uLL unsigned long long
LL powmod(LL a,LL b) {LL res=1;a%=mod;for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
#define F(x) ((x)/3+((x)%3 == 1 ? 0 : tb))
#define G(x) ((x)<tb ? (x)*3+1 : ((x) - tb)*3+2)
#define lowbit(x) ((x)&(-x))
#define fi first
#define se second
#define pii pair<int,int>

int gcd(int x,int y){
    while(y){
        int t = x % y;
        x = y;
        y = t;
    }
    return x;
}

int pos[N],a[N],on[N],at[N];

int main(){
    int n,m,q;
    scanf("%d%d%d",&n,&m,&q);
    for(int i = 0; i < q; i++)
        scanf("%d",&a[i]),a[i]--;
    
    for(int i = 0; i < m; i++){
        at[i] = 0;
        pos[i] = -1;
        on[i] = -1;
    }
    
    int have = 0;
    at[0] = n;
    for(int i = q - 1; i >= 0; i--){
        int v = a[i];
        if(pos[v] == -1){
            pos[v] = have;
            on[have] = v;
            at[have]--;
            have++;
            at[have]++;
            continue;
        }
        if(at[pos[v]] > 0)
            at[pos[v]]--,at[pos[v]+1]++;
    }
    
    int fs = -1;
    for(int i = 0; i <= m; i++)
        if(at[i] > 0){
            fs = i;
            break;
        }
    
    vector<int> all;
    for(int i = fs; i < have; i++){
        all.push_back(on[i]);
    }
    for(int i = 0; i < m; i++)
        if(pos[i] == -1)
            all.push_back(i);
    
    sort(all.begin(), all.end());
    
    for(int i = fs; i < have; i++)
        if(on[i] != all[i - fs]){
            puts("No");
            return 0;
        }
    puts("Yes");
    return 0;
}