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 <cstdlib>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <cstring>

using namespace std;

typedef long long LL;
typedef unsigned long long ULL;

#define SIZE(x) (int((x).size()))
#define rep(i,l,r) for (int i=(l); i<=(r); i++)
#define repd(i,r,l) for (int i=(r); i>=(l); i--)
#define rept(i,c) for (typeof((c).begin()) i=(c).begin(); i!=(c).end(); i++)

#ifndef ONLINE_JUDGE
#define debug(x) { cerr<<#x<<" = "<<(x)<<endl; }
#else
#define debug(x) {}
#endif

#define maxn 100010

int op[maxn], used[maxn], cnt[maxn], u[maxn], com[maxn], lis[maxn], seq[maxn], where[maxn];

void lemon()
{
	int n,m,q; scanf("%d%d%d",&n,&m,&q);
	rep(i,1,q) scanf("%d",&op[i]);
	rep(i,1,q) cnt[op[i]]++;
	int s=0, zn=0;
	repd(i,q,1)
	{
		int ch=op[i];
		if (used[ch])
		{
			int which=lower_bound(com+1,com+q+2,-(where[ch]-1))-com;
			if (com[which]!=-(where[ch]-1)) continue;
			com[which]--;
		}
		else
		{
			used[ch]=1;
			s++; seq[s]=ch; where[ch]=s;
			com[1]--;
		}	
	}
	int place=-com[n];
	memset(used,0,sizeof used);
	rep(i,1,place) used[seq[i]]=1;
	int all=0;
	rep(i,1,m) if (!used[i]) { all++; lis[all]=i; }
	int cpos=1;
	rep(i,place+1,s)
	{
		if (seq[i]!=lis[cpos])
		{
			printf("No\n");
			return;
		}
		cpos++;
	}
	printf("Yes\n");
}

int main()
{
	ios::sync_with_stdio(true);
	#ifndef ONLINE_JUDGE
		//freopen("e.in","r",stdin);
	#endif
	lemon();
	return 0;
}

