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>

using namespace std;

typedef pair<int, int> PII;
typedef long long ll;

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define pct __builtin_popcount

#define N 100100
int n, m, q;
int a[N];

int b[N];
int c[N], L;
bool v[N];

int u[N];
int fi[N];

int main () {
	cin >> n >> m >> q;
	for (int i = 0; i < q; i ++) {
		cin >> a[i];
		a[i] --;
	}
	/*
	if (a[q-1] == 0) {
		int u = q-1;
		int nw = 0;
		bool F = true;
		while (nw < m-1 && u >= 0) {
			if (a[u] != nw) {
				F = false; break;
			}
			while (u >= 0 && a[u] <= nw) u--;
			nw ++;
		}
		if (F) {puts ("Yes"); return 0;}
	}
	*/
	memset(v, 0, sizeof v);
	memset(b, -1, sizeof b);
	for (int i = q-1; i >= 0; i --) if (!v[a[i]]) {
		b[a[i]] = L;
		c[L++] = a[i];
		v[a[i]] = 1;
	}
	memset(v, 0, sizeof v);
	int la = 0;
	int lw = 0;
	for (int i = 0; i < L; i ++) {
		if (c[i] != lw) la = i+1;
		v[c[i]] = 1;
		while (v[lw]) lw++;
	}
	if (la == 0) {
		puts ("Yes");
		return 0;
	}
	memset(fi, -1, sizeof fi);
	memset(v, 0, sizeof v);
	for (int i = q-1; i >= 0; i --) {
		if (b[a[i]] >= la) continue;
		if (b[a[i]] == 0 && u[0] == n) continue;
		if (b[a[i]] > 0 && u[b[a[i]]-1] == u[b[a[i]]]) continue;
		if (fi[b[a[i]]] == -1) fi[b[a[i]]] = i;
		v[i] = 1;
		u[b[a[i]]] ++;
	}
	if (u[la-1] != n) {
		puts ("No"); return 0;
	}
	bool F = true;
	for (int i = q-1; i >= 0; i --) if (!v[i]) {
		if (b[a[i]] >= la) {
			if (fi[la-1] < i) {
				F = false; break;
			}
		} else 
		if (b[a[i]] >= 0) {
			if (fi[b[a[i]]] < i) {
				F = false; break;
			}
		}
	}
	if (F) puts ("Yes"); else puts ("No");
	return 0;
}