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 <iostream>
#include <cmath>
#include <vector>
#include <map>
#include <set>
#include <string>
#include <cstring>
#include <queue>
#include <ctime>
#include <cassert>
#include <cstdio>
#include <algorithm>
#include <unordered_set>
#include <unordered_map>
#include <bitset>

using namespace std;

#define fr first
#define sc second
#define mp make_pair
#define pb push_back
#define epr(...) fprintf(stderr, __VA_ARGS__)
#define db(x) cerr << #x << " = " << x << endl
#define db2(x, y) cerr << "(" << #x << ", " << #y << ") = (" << x << ", " << y << ")\n"; 
#define db3(x, y, z) cerr << "(" << #x << ", " << #y << ", " << #z << ") = (" << x << ", " << y << ", " << z << ")\n"
#define all(a) (a).begin(), (a).end()

#define equal equalll
#define less lesss
const int N = 1e6 + 10;
const long long INF = 1e9 + 19;

int n, m;
int q;
int a[N];

void read() {
	if (scanf("%d%d%d", &n, &m, &q) != 3)
		exit(0);
	for (int i = 0; i < q; i++) {
		scanf("%d", &a[i]);
		a[i]--;
	}
}


void solve() {
	vector < bool > use(m);
	vector < int > answer;
	for (int i = q - 1; i >= 0; i--) {
		if (!use[a[i]]) {
			answer.pb(a[i]);
			use[a[i]] = 1;
		}
	}
	int r = answer.size();
	for (int i = 0; i < m; i++)
		if (!use[i])
			answer.pb(i);

	//for (auto x: answer)
		//cerr << x << " ";
	//cerr << endl;

	int l = r;
	//db(r);
	//db(m);
	for (; ;) {
		if (l == 0) break;
		if (l < m) {
			if (!(answer[l - 1] < answer[l]))
				break;
		}
		l--;
	}
			//l > 0 && ((l == m && answer[l - 1] == m - 1) || answer[l - 1] < answer[l]); l--);
	//db2(l, r);
	vector < int > b(n, -1);
	vector < int > rev(m);
	for (int i = 0; i < m; i++)
		rev[answer[i]] = i;

	for (int i = q - 1; i >= 0; i--) {
		int x = a[i];
		int pos = rev[x] - 1;
		//db2("find: ", pos);
		int posB = upper_bound(b.begin(), b.end(), pos) - b.begin() - 1;
		if (posB != -1 && b[posB] == pos) {
			b[posB]++;	
		}
	}

	//cerr << "b: ";
	//for (int i = 0; i < n; i++)
		//cerr << b[i] << " ";
	//cerr << endl;

	bool flag = 1;
	for (int i = 0; i < n; i++)
		flag &= l - 1 <= b[i];

	
	if (flag)
		puts("Yes");
	else
		puts("No");


}

void stress() {

}

int main(){
#ifdef MY_DEBUG
    freopen("in", "r", stdin);
    //freopen("out", "w", stdout);
#endif
    if (1) {
        int k = 1000;
        for (int tt = 0; tt < k; tt++) {
            read();
            solve();
        }
    }
    else {
        stress();
    }

    return 0;
}

