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<vector>
#include<cmath>
#include<map>
#include<cstdlib>
#include<iostream>
#include<sstream>
#include<fstream>
#include<string>
#include<algorithm>
#include<cstring>
#include<cstdio>
#include<set>
#include<stack>
#include<bitset>
#include<functional>
#include<ctime>
#include<queue>
#include<deque>
#include<complex>
using namespace std;
#define pb push_back
#define pf push_front
typedef long long lint;
typedef complex<double> P;
#define mp make_pair
#define fi first
#define se second
typedef pair<int,int> pint;
#define All(s) s.begin(),s.end()
#define rAll(s) s.rbegin(),s.rend()
#define REP(i,a,b) for(int i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
bool sumi[114514];
int a[114514],pos[114514],num[114514];
vector<int> v;
int main()
{
	int n,m,q,lo=0;
	scanf("%d %d",&m,&n);
	scanf("%d",&q);
	rep(i,q){
		scanf("%d",&a[i]);a[i]--;
	}
	for(int i=q-1;i>=0;i--){
		if(sumi[a[i]]) continue;
		v.pb(a[i]);sumi[a[i]]=true;
	}
	rep(i,n){
		if(!sumi[i]) v.pb(i);
	}
	//rep(i,n) cout<<v[i]<<' ';cout<<endl;
	rep(i,n) pos[v[i]]=i;
	int t=n-1;
	for(;t>0;t--){
		if(v[t]<v[t-1]) break;
	}
	//cout<<t<<endl;
	memset(num,0,sizeof(num));num[0]=m;
	int hi=0;
	for(int i=q-1;i>=0;i--){
		if(num[pos[a[i]]]>0){
			num[pos[a[i]]]--;
			num[pos[a[i]]+1]++;
			hi=max(hi,pos[a[i]]+1);
			//while(lo<n && num[lo]<1) lo++;
		}
		else if(hi<pos[a[i]]){
			cout<<"No"<<endl;return 0;
		}
	}
	rep(i,n){
		if(num[i]>0 && t>i){
			cout<<"No"<<endl;return 0;
		}
	}
	cout<<"Yes"<<endl;
}
