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>
#define fi first
#define se second
#define pii pair<int,int>
#define mp make_pair
#define pb push_back
#define space putchar(' ')
#define enter putchar('\n')
#define eps 1e-10
#define MAXN 100005
//#define ivorysi
using namespace std;
typedef long long int64;
typedef unsigned int u32;
typedef double db;
template<class T>
void read(T &res) {
    res = 0;T f = 1;char c = getchar();
    while(c < '0' || c > '9') {
	if(c == '-') f = -1;
	c = getchar();
    }
    while(c >= '0' && c <= '9') {
	res = res * 10 +c - '0';
	c = getchar();
    }
    res *= f;
}
template<class T>
void out(T x) {
    if(x < 0) {x = -x;putchar('-');}
    if(x >= 10) {
	out(x / 10);
    }
    putchar('0' + x % 10);
}
int N,M,Q;
int a[MAXN],pos[MAXN],reserve[MAXN];
bool vis[MAXN];
vector<int> v;
void Solve() {
    read(N);read(M);read(Q);
    v.pb(0);
    for(int i = 1 ; i <= Q ; ++i) {read(a[i]);}
    for(int i = Q ; i >= 1 ; --i) {
	if(!vis[a[i]]) {
	    v.pb(a[i]);
	    vis[a[i]] = 1;
	}
    }
    for(int i = 1 ; i <= M ; ++i) {
	if(!vis[i]) v.pb(i);
    }
    for(int i = 1 ; i <= M ; ++i) pos[v[i]] = i;
    int p = M;
    while(p > 1 && v[p - 1] < v[p]) --p;
    if(p == 1) {puts("Yes");return;}
    for(int i = Q ; i >= 1 ; --i) {
	if(a[i] == v[1]) reserve[1]++;
	else {
	    if(reserve[pos[a[i]] - 1]) {
		reserve[pos[a[i]] - 1]--;
		reserve[pos[a[i]]]++;
	    }
	}
    }
    int res = 0;
    for(int i = p - 1 ; i <= M ; ++i) {
	res += reserve[i];
    }
    if(res >= N) {puts("Yes");return;}
    else {puts("No");return;}
}

int main() {
#ifdef ivorysi
    freopen("f1.in","r",stdin);
#endif
    Solve();
    return 0;
}
