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 "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "unordered_map"
#include "unordered_set"
#include "iomanip"
#include "cmath"
#include "random"
#include "bitset"
#include "cstdio"
#include "numeric"
#include "cassert"
#include "functional"

using namespace std;

//constexpr long long int MOD = 1000000007;
constexpr int MOD = 1000000007;
//constexpr int MOD = 998244353;
//constexpr long long int MOD = 998244353;
constexpr double EPS = 1e-8;

//int N, M, K, H, W, L, R;
long long int N, M, K, H, W, L, R;


int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);

	cin >> N >> M;
	cin >> K;
	vector<int>v(K);
	for (auto &i : v)cin >> i;
	vector<int>box;
	vector<int>used(M + 1, 0);
	int num = 0;
	reverse(v.begin(), v.end());
	for (auto i : v) {
		if (used[i])continue;
		used[i] = 1;
		box.push_back(i);
	}
	//reverse(box.begin(), box.end());
	num = box.back();
	bool st = true;
	//for (auto i : box)cout << i << endl;
	for (int i = 0; i < box.size(); i++) {
		if (box[i] != i + 1)st = false;
	}

	reverse(v.begin(), v.end());
	if (st) {
		cout << "Yes\n";
		return 0;
	}
	vector<set<int>>place(M + 1);
	for (int i = 0; i < v.size(); i++) {
		place[v[i]].insert(-i);
	}
	place[box.back()].insert(box.size() - 1);
	for (int i = (int)box.size() - 2; i >= 0; i--) {
		if (box[i] < box[i + 1]) {
			place[box[i]].insert(i);
		}
		else break;
	}
	for (int i = 0; i < N; i++) {
		int p = -MOD;
		for (auto j : box) {
			//cout << i << " " << j << " " << p << endl;
			auto it = place[j].lower_bound(p);
			if (it == place[j].end()) {
				cout << "No\n";
				return 0;
			}
			p = *it;
			if (*it <= 0)place[j].erase(it);
		}
	}
	cout << "Yes\n";
}