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 mp make_pair
#define pb push_back      
#define F first
#define S second
#define SS stringstream
#define sqr(x) ((x)*(x))
#define m0(x) memset(x,0,sizeof(x))
#define m1(x) memset(x,63,sizeof(x))
#define CC(x) cout << (x) << endl
#define pw(x) (1ll<<(x))
#define buli(x) __builtin_popcountll(x)
#define forn(i, n) for(int i = 0 ; (i) < (n) ; ++i)
#define M 1000000007
#define N 211111

#define TASK "1"

using namespace std;

int n, m, q;
vector<int> need[N], ans[N];

int used[N];
int t[N];
int was[N];

vector<int> dop(vector<int> a) {
	for (int i = 1; i <= m; i++) used[i] = 0;
	for (int i = 0; i < a.size(); i++) used[a[i]] = 1;
	for (int i = 1; i <= m; i++) if (!used[i]) a.pb(i);
	return a;
}

int main(){
	#ifdef home
		freopen(TASK".in","r",stdin);	
		freopen(TASK".out","w",stdout);
	#endif		
	ios::sync_with_stdio(false);
	cin >> n >> m >> q;
	for (int i = 0; i < q; i++) {
		cin >> t[i];
	}
	for (int i = 1; i < n; i++) need[0].pb(i);

	for (int i = q - 1; i >= 0; i--) {
		int g = t[i];

		if (was[g] == 0) {
			ans[0].pb(g);
			was[g] = 1;

			for (int h : need[0]) need[g].pb(h);
			need[0].clear();

			continue;
		}
		if (need[g].size() == 0) {
			continue;
		}

		int t = need[g].back();
		need[g].pop_back();

		ans[t].pb(g);

		if (ans[t].size() < m) {
			if (ans[0].size() == ans[t].size()) need[0].pb(t); else need[ans[0][ans[t].size()]].pb(t);
		}
	}
//	for (int i = 0; i < n; i++) {
//		for (int j = 0; j < ans[i].size(); j++) cout << ans[i][j] << " ";
//		cout << endl;
//	}
	int x = -1;
	for (int i = 0; i < n; i++) if (x == -1 || ans[i].size() < ans[x].size()) x = i;
	if (dop(ans[0]) != dop(ans[x])) cout << "No\n"; else cout << "Yes\n" << endl;

	return 0;
}