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 pb push_back
#define mp make_pair
#define fi first
#define se second
#define SZ(x) ((int)x.size())
#define FOR(i,a,b) for (int i=a;i<=b;++i)
#define FORD(i,a,b) for (int i=a;i>=b;--i)
using namespace std;
typedef long long LL;
typedef pair<int,int> pa;
typedef vector<int> vec;
void getint(int &v){
    char ch,fu=0;
    for(ch='*'; (ch<'0'||ch>'9')&&ch!='-'; ch=getchar());
    if(ch=='-') fu=1, ch=getchar();
    for(v=0; ch>='0'&&ch<='9'; ch=getchar()) v=v*10+ch-'0';
    if(fu) v=-v;
}
vec v[100010];
bool u[500010];
int now,q,n,ap[500010],f[500010],m,a[500010],used,A[500010],B[500010],AS,BS;
bool rem(){
	int t=0;
	FOR(i,1,m) if (!u[i]){
		if (ap[i]<t) return 0;
		t=ap[i];
	}
/*	AS=BS=0;
	FOR(i,1,q) if (!u[a[i]] && i==v[a[i]][0]) A[++AS]=a[i];
	FOR(i,1,m) if (!u[i]) B[++BS]=i;
	FOR(i,1,AS) if (A[i]!=B[i]) return 0;
*/	return 1;
}
int main(){
	cin>>n>>m>>q;
	FOR(i,1,q) getint(a[i]);
	reverse(a+1,a+q+1);
	FOR(i,1,n) f[i]=0;
	FOR(i,1,m) ap[i]=q+1;
	FOR(i,1,q){
		v[a[i]].pb(i);
		if (ap[a[i]]==q+1) ap[a[i]]=i;
	}
	now=1;
	while (now<=q){
		if (u[a[now]]){++now;continue;}
		if (rem()) return puts("Yes"),0;
		u[a[now]]=1;
		int t=0;
		FOR(i,1,n){
			while (t<SZ(v[a[now]]) && v[a[now]][t]<=f[i]) ++t;
			if (t>=SZ(v[a[now]])){
				int tt=1;
				return puts("No"),0;
			}
			f[i]=v[a[now]][t];
			++t;
		}
		++now;
	}
	puts("Yes");
	return 0;
}