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 <algorithm>  
#include <iostream>  
#include <sstream>  
#include <string>  
#include <cstring>
#include <vector>  
#include <queue>  
#include <set>  
#include <map>  
#include <cstdio>  
#include <cstdlib>  
#include <cctype>  
#include <cmath>  
#include <list>  
#include <cassert>
#include <ctime>
#include <climits>
using namespace std;  

#define PB push_back  
#define MP make_pair  
#define SZ(v) ((int)(v).size())  
#define FOR(i,a,b) for(int i=(a);i<(b);++i)  
#define REP(i,n) FOR(i,0,n)  
#define FORE(i,a,b) for(int i=(a);i<=(b);++i)  
#define REPE(i,n) FORE(i,0,n)  
#define FORSZ(i,a,v) FOR(i,a,SZ(v))  
#define REPSZ(i,v) REP(i,SZ(v))  
typedef long long ll;
typedef unsigned long long ull;
ll gcd(ll a,ll b) { return b==0?a:gcd(b,a%b); }

const int MAXN=100000;
const int MAXLEN=100000;
const int MAXOP=100000;

int n,len,nop;
int op[MAXOP];

int pos[MAXLEN],npos;
int cnt[MAXLEN+1];
int res[MAXLEN];

bool solve() {
	REP(i,len) pos[i]=-1; npos=0;
	REPE(i,len) cnt[i]=0; cnt[0]=n;
	for(int i=nop-1;i>=0;--i) {
		int cur=op[i];
		if(pos[cur]==-1) {
			int p=npos; pos[cur]=npos++;
			assert(cnt[p]>0); --cnt[p],++cnt[p+1];
		} else {
			int p=pos[cur];
			if(cnt[p]>0) --cnt[p],++cnt[p+1];
		}
	}
	REP(i,len) if(pos[i]==-1) pos[i]=npos++;
	REP(i,len) res[pos[i]]=i;
	int need=len-1; while(need>0&&res[need-1]<res[need]) --need;
	//printf("res:"); REP(i,len) printf(" %d",res[i]+1); puts("");
	//printf("cnt:"); REPE(i,len) printf(" %d",cnt[i]); printf(" (need=%d)\n",need);
	REP(i,need) if(cnt[i]>0) return false;
	return true;
}

void run() {
	scanf("%d%d%d",&n,&len,&nop); REP(i,nop) scanf("%d",&op[i]),--op[i];
	printf("%s\n",solve()?"Yes":"No");
}

int main() {
	run();
	return 0;
}
