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<string>
#include<deque>
#include<queue>
#include<vector>
#include<algorithm>
#include<iostream>
#include<set>
#include<cmath>
#include<tuple>
#include<chrono>
#include<functional>
#include<random>
#include<unordered_set>
using namespace std;
typedef long long int llint;
#define mp make_pair
#define mt make_tuple
#define pub push_back
#define puf push_front
#define pob pop_back
#define pof pop_front
#define fir first
#define sec second
#define res resize
#define ins insert
#define era erase
const int mod=1000000007;
const int big=1e9+10;
const long double pai=3.141592653589793238462643383279;
template <class T,class U>void mineq(T& a,U b){if(a>b){a=b;}}
template <class T,class U>void maxeq(T& a,U b){if(a<b){a=b;}}
llint gcd(llint a,llint b){if(b==0){return a;}return gcd(b,a%b);}//a>b
llint lcm(llint a,llint b){return (a/gcd(max(a,b),min(a,b)))*b;}
int main(void){
	int n,m,q,i,j,zyu=1,nai=0;cin>>n>>m>>q;
	vector<int>ban(q);//入力 番号
	vector<deque<int>>numlis(m+1);//どこに番号があるのだろう?
	multiset<int>las;//最後に番号入れたのいつ？
	vector<bool>mita(m+1);
	for(i=0;i<n;i++){las.ins(big);}
	for(i=0;i<q;i++){
		int in;cin>>in;
		ban[i]=in;
		numlis[in].puf(i);
	}
	for(i=q-1;i>=0;i--){
		int no=ban[i];
		if(mita[no]){continue;}//skipped
		bool mincan=false;
		while(mita[zyu]){zyu++;}
		mita[no]=true;
		mincan=(zyu==no);
		vector<int>iti;
		int x=0;
		for(j=0;j<numlis[no].size()&&x<n;j++){
			auto it=las.lower_bound(numlis[no][j]);
			if(it==las.end()){continue;}
			x++;//成功数
			iti.pub(numlis[no][j]);
			las.erase(it);
		}
		if(x<n&&(!mincan)){cout<<"No"<<endl;return 0;}
		for(;x<n-nai;x++){
			auto it=las.lower_bound(-1);
			iti.pub(-999);
			las.erase(it);
			nai++;
		}
		while(iti.size()!=0){las.ins(iti.back());iti.pob();}
		//cout<<endl<<"de i="<<i;
		//for(auto it=las.begin();it!=las.end();it++){cout<<" "<<(*it);}
	}
	cout<<"Yes"<<endl;
	return 0;
}