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
/*
Author : samjia2000
Source : code festival 2016 qual A E.LRU Puzzle
*/
#include<iostream>
#include<cstring>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<set>
#include<bitset>
#include<map>

#define fo(i,a,b) for(int i=a;i<=b;i++)
#define fd(i,a,b) for(int i=a;i>=b;i--)

using namespace std;

typedef long long LL;
typedef double db;

int get(){
	char ch;
	while(ch=getchar(),(ch<'0'||ch>'9')&&ch!='-');
	if (ch=='-'){
		int s=0;
		while(ch=getchar(),ch>='0'&&ch<='9')s=s*10+ch-'0';
		return -s;
	}
	int s=ch-'0';
	while(ch=getchar(),ch>='0'&&ch<='9')s=s*10+ch-'0';
	return s;
}

const int N = 100005;

int n,m,q;
int a[N];
bool bz[N];
int w[N],lst[N];
int Rig[N];
int a1[N],a2[N],k1,k2;
int be[N];
int num[N];

int main(){
	n=get();m=get();
	q=get();
	fo(i,1,q)a[i]=get();
	fo(i,1,q){
		lst[i]=w[a[i]];
		w[a[i]]=i;
	}
	fo(i,1,n)Rig[i]=q+1;
	fd(i,q,1)
	if (!bz[a[i]]){
		int x=1,w=i;
		for(;x<=n&&w;w=lst[w]){
			if(w<Rig[x]){
				Rig[x]=w;
				x++;
			}
		}
		if (x>n)bz[a[i]]=1;
		else{
			fo(x,1,m)if (!bz[x])a1[++k1]=x;
			fd(x,i,1)if (!bz[a[x]])bz[a2[++k2]=a[x]]=1;
			bool pd=1;
			fo(x,1,k2)pd&=(a1[x]==a2[x]);
			if (!pd)return printf("No\n"),0;
			return printf("Yes\n"),0;
		}
	}
	printf("Yes\n");
	return 0;
}