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 <string>
#include <vector>
#include <queue>
#include <deque>
#include <algorithm>
#include <set>
#include <map>
#include <bitset>
#include <cmath>
#include <functional>
#include <iomanip>
#define vll vector<ll>
#define vvvl vector<vvl>
#define vvl vector<vector<ll>>
#define VV(a, b, c, d) vector<vector<d> >(a, vector<d>(b, c))
#define VVV(a, b, c, d) vector<vvl>(a, vvl(b, vll (c, d)));
#define re(c, b) for(ll c=0;c<b;c++)
#define all(obj) (obj).begin(), (obj).end()
typedef long long int ll;
typedef long double ld;
using namespace std;

void err(){
  std::cout << "No" << '\n';
  exit(0);
}
void ok(){
  std::cout << "Yes" << '\n';
  exit(0);
}
int main(int argc, char const *argv[]) {
  ll n, m;std::cin >> n >> m;
  map<ll, ll> mp;
  vll fi(m+1, -1);
  ll q;std::cin >> q;
  vll a(q);
  vll num;

  re(i, q) scanf("%lld", &a[i]);
  for(int i=q-1;i>=0;i--){
    if(mp.find(a[i])!=mp.end()) continue;
    num.push_back(a[i]);
    mp.emplace(a[i], num.size());
    fi[a[i]] = i; //初めて現れる
  }
  for(int i=1;i<=m;i++) if(mp.find(i)==mp.end()) num.push_back(i);
  ll las = m-1;
  while(las!=0&&num[las]>num[las-1]) las--;

  multiset<ll> st;
  for(int i=q-1;i>=0;i--){
    ll x = mp.at(a[i]);
    if(x>las) continue;
    if(x==1&&st.size()!=n) st.insert(1);
    else{
      auto itr = st.find(x-1);
      if(itr==st.end()) continue;
      st.erase(itr);
      st.insert(x);
    }
  }
  if(las==0) ok();
  if(st.size()!=n) err();
  for(auto t:st) if(t!=las) err();
  ok();
  return 0;
}
