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<stdio.h>
#include<string.h>
#include<vector>
using namespace std;
int N,M,Q,MIN;
int a[111111];
int LST[111111];
vector<int> pos[111111];
bool valid[111111];

struct Node{
	int prev,next;
	int val;
} node[111111];
int head,tail,Z;
int pnt[111111],cnt_bad;
int nodelen;

int bit[111111];
int lowbit(int x){
	return x&-x;
}
void add(int x){
	while(x <= M){
		bit[x]++;
		x+=lowbit(x);
	}
}
int query(int x){
	int r=0;
	while(x){
		r+=bit[x];
		x-=lowbit(x);
	}
	return r;
}

bool chk2(){
	if(node[head].next == -1)return true;
	int start = node[node[head].next].val;
	int end = node[tail].val;
	return end - start + 1 == nodelen + query(end) - query(start-1);
}
bool chk(){
	cnt_bad = 0;
	for(int i=1; i<=M; i++)
		valid[i] = true;

	head = tail = ++Z;
	node[Z].prev = -1;
	node[Z].next = -1;
	node[Z].val = 0;

	nodelen = 0;
	for(int i=1; i<=M; i++)
		if(!pos[i].empty()){
			if(tail != head){
				if(pos[node[tail].val].back() < pos[i].back())
					cnt_bad++;
			}
			++Z;
			node[Z].prev = tail;
			node[Z].next = -1;
			node[Z].val = i;
			pnt[i] = Z;

			node[tail].next = Z;
			tail = Z;
			
			nodelen++;
		}

	memset(bit,0,sizeof(bit));

	MIN = 1;
	for(int i=Q; i>=1; i--){
		if(!valid[a[i]])continue;
		int x = a[i];
		if(x == MIN){
			if(cnt_bad == 0 && chk2())return true;
		}
		int sz = (int)pos[x].size(), ct = 1;
		for(int j=sz-1; j>=0; j--){
			if(pos[x][j] < LST[ct]){
				LST[ct] = pos[x][j];
				++ct;
				if(ct > N)
					break;
			}
		}
		if(ct <= N)
			return false;
		valid[x] = false;

		int p = pnt[x];
		int prev_pnt = node[p].prev;
		int next_pnt = node[p].next;

		if(prev_pnt != head && pos[node[prev_pnt].val].back() < pos[x].back())cnt_bad--;
		if(next_pnt != -1 && pos[x].back() < pos[node[next_pnt].val].back())cnt_bad--;
		if(prev_pnt != head && next_pnt != -1 && pos[node[prev_pnt].val].back() < pos[node[next_pnt].val].back())cnt_bad++;

		node[prev_pnt].next = next_pnt;
		if(next_pnt!=-1)node[next_pnt].prev = prev_pnt;

		if(tail == p)
			tail = prev_pnt;
		nodelen--;
		add(x);

		while(MIN <= M && !valid[MIN])MIN++;
	}
	return true;
}
int main(){
	scanf("%d%d%d",&N,&M,&Q);
	for(int i=1; i<=Q; i++){
		scanf("%d",&a[i]);
		pos[a[i]].push_back(i);
	}
	for(int i=1; i<=N; i++)
		LST[i] = 123456789;
	puts(chk()?"Yes":"No");
	return 0;
}