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 SZ(X) ((int)(X).size())
#define ALL(X) (X).begin(), (X).end()
#define REP(I, N) for (int I = 0; I < (N); ++I)
#define REPP(I, A, B) for (int I = (A); I < (B); ++I)
#define RI(X) scanf("%d", &(X))
#define RII(X, Y) scanf("%d%d", &(X), &(Y))
#define RIII(X, Y, Z) scanf("%d%d%d", &(X), &(Y), &(Z))
#define DRI(X) int (X); scanf("%d", &X)
#define DRII(X, Y) int X, Y; scanf("%d%d", &X, &Y)
#define DRIII(X, Y, Z) int X, Y, Z; scanf("%d%d%d", &X, &Y, &Z)
#define RS(X) scanf("%s", (X))
#define CASET int ___T, case_n = 1; scanf("%d ", &___T); while (___T-- > 0)
#define MP make_pair
#define PB push_back
#define MS0(X) memset((X), 0, sizeof((X)))
#define MS1(X) memset((X), -1, sizeof((X)))
#define LEN(X) strlen(X)
#define VPII vector<pair<int,int> >
#define F first
#define S second
#define RF(x) freopen(x,"r",stdin)
#define WF(x) freopen(x,"w",stdout)
typedef long long LL;
using namespace std;
typedef pair<LL,LL> PLL;
typedef pair<int,int> PII;
const LL MOD = 1e9+7;
const int SIZE = 1e6+5;
const LL INF = 1LL<<58;
const double eps = 1e-13;

int d[100009];
int cameout[100009];
int cc[100009];
vector<int> sq;

int main(){
	DRIII(n,m,q);//number of arrays,length
	REP(i,q){
		RI(d[i]);d[i]--;
	}
	MS1(cameout);
	int ci=0;
	for(int i=q-1;i>=0;i--){
		if(cameout[d[i]]!=-1)continue;
		cameout[d[i]]=ci++;
		sq.PB(d[i]);
	}
	int minleft=100009;
	REP(i,m){
		if(cameout[i]==-1)minleft=min(minleft,i);
	}
	for(int i=ci-1;i>=0;i--){
		if(sq[i]<minleft){
			cameout[sq[i]]=-1;
			ci--;
			minleft=sq[i];
		}
		else break;
	}
	for(int i=q-1;i>=0;i--){
		if(cameout[d[i]]==-1)continue;
		int ci=cameout[d[i]];
		cc[ci]++;
		if(ci!=0){
			cc[ci]=min(cc[ci],cc[ci-1]);
		}
	}
	//printf("%d",ci);
	REP(i,ci){
		if(cc[i]<n){
			printf("No");return 0;
		}
	}printf("Yes");
}
