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 <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <deque>
#include <complex>
#include <stack>
#include <queue>
#include <cstdio>
#include <cctype>
#include <cstring>
#include <ctime>
#include <iterator>
#include <bitset>
#include <numeric>
#include <list>
#include <iomanip>
#include <cassert>

#if __cplusplus >= 201103L
#include <array>
#include <tuple>
#include <initializer_list>
#include <unordered_set>
#include <unordered_map>
#include <forward_list>

#define cauto const auto&
#define ALL(v) begin(v),end(v)
#else
#define ALL(v) (v).begin(),(v).end()
#endif

using namespace std;


namespace{
typedef long long LL;
typedef pair<int,int> pii;
typedef pair<LL,LL> pll;

typedef vector<int> vint;
typedef vector<vector<int> > vvint;
typedef vector<long long> vll, vLL;
typedef vector<vector<long long> > vvll, vvLL;

#define VV(T) vector<vector< T > >

template <class T>
void initvv(vector<vector<T> > &v, int a, int b, const T &t = T()){
	v.assign(a, vector<T>(b, t));
}

template <class F, class T>
void convert(const F &f, T &t){
	stringstream ss;
	ss << f;
	ss >> t;
}


#define REP(i,n) for(int i=0;i<int(n);++i)
#define RALL(v) (v).rbegin(),(v).rend()


#define MOD 1000000007LL
#define EPS 1e-8


void mainmain(){
	int n, m, q;
	scanf("%d%d%d", &n, &m, &q);
	vint as(q);
	for(int i = 0; i < q; ++i){
		scanf("%d", &as[i]);
		--as[i];
	}

	vint vis(m);
	vector<int> seq;
	for(int i = q; i--; ){
		if(!vis[as[i]]){
			vis[as[i]] = 1;
			seq.push_back(as[i]);
		}
	}
	for(int i = 0; i < m; ++i){
		if(!vis[i]){ seq.push_back(i); }
	}
	vint rtbl(m);
	for(int i = 0; i < m; ++i){
		rtbl[seq[i]] = i;
	}

	vint nxt(n);
	for(int i = q; i--; ){
		int x = rtbl[as[i]];
		int k = lower_bound(ALL(nxt), x, greater<int>()) - nxt.begin();
		if(k < n && nxt[k] == x){
			++nxt[k];
		}
	}

	int minimum = *min_element(ALL(nxt));
	vis.assign(m, 0);
	vint seq2;
	for(int i = 0; i < minimum; ++i){
		seq2.push_back(seq[i]);
		vis[seq[i]] = 1;
	}
	for(int i = 0; i < m; ++i){
		if(!vis[i]){
			seq2.push_back(i);
		}
	}

	puts(seq == seq2 ? "Yes" : "No");
}



}
int main() try{
//	ios::sync_with_stdio(false); cin.tie(0);
	cout << fixed << setprecision(10);
	cerr << fixed << setprecision(4);
	mainmain();
}
catch(...){}
