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<cstdio>

using namespace std;

int N, M;
int a[100100];
int Q;

int ids[100100];
int cnts[100100];
int num;
int rev_ids[100100];

void init(){
	for(int i = 0; i < N; ++i){
		ids[i] = -1;
		cnts[i] = 0;
	}
	num = 0;
}

bool used[100100];

void restore(int *a, int L, int N){
	for(int i = 0; i < N; ++i) used[i] = false;
	for(int i = 0; i < L; ++i) used[a[i]] = true;
	int c = L;
	for(int i = 0; i < N; ++i){
		if(!used[i]) a[c++] = i;
	}
}

int fi[100100];
int la[100100];

bool solve(){
	init();
	for(int i = Q - 1; i >= 0; --i){
		int x = a[i];
		if(ids[x] == -1){
			ids[x] = num++;
			rev_ids[ids[x]] = x;
		}
		int id = ids[x];
		//printf("%d\n", id);
		if(id > 0 && cnts[id - 1] == cnts[id]){
			//nothing
		} else {
			if(cnts[id] < M){
				cnts[id]++;
			}
		}
	}
	bool flg = true;
	for(int i = 0; i < N; ++i){
		if(cnts[i] != 0 && cnts[i] != M){
			flg = false;
			break;
		}
	}
	if(flg) return true;
	/*for(int i = 0; i < N; ++i){
		printf("%d %d\n", rev_ids[i], cnts[i]);
	}
	printf("\n");*/
	int l1 = 0, l2 = 0;
	for(int i = 0; i < N; ++i){
		if(cnts[i] > 0){
			fi[i] = rev_ids[i];
			l1++;
		}
		
		if(cnts[i] == M){
			la[i] = rev_ids[i];
			l2++;
		}
	}
	restore(fi, l1, N);
	restore(la, l2, N);
	/*for(int i = 0; i < N; ++i){
		printf("%d %d\n", fi[i], la[i]);
	}*/
	for(int i = 0; i < N; ++i){
		if(fi[i] != la[i]) return false;
	}
	return true;
}

void input(){
	scanf("%d%d", &M, &N);
	scanf("%d", &Q);
	for(int i = 0; i < Q; ++i){
		scanf("%d", a + i);
		a[i]--;
	}
}

int main(){
	input();
	bool flg = solve();
	if(flg) printf("Yes\n");
	else printf("No\n");
	return 0;
}
