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>

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

typedef int _loop_int;
#define REP(i,n) for(_loop_int i=0;i<(_loop_int)(n);++i)
#define FOR(i,a,b) for(_loop_int i=(_loop_int)(a);i<(_loop_int)(b);++i)
#define FORR(i,a,b) for(_loop_int i=(_loop_int)(b)-1;i>=(_loop_int)(a);--i)

#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define DEBUG_VEC(v) cout<<#v<<":";REP(i,v.size())cout<<" "<<v[i];cout<<endl
#define ALL(a) (a).begin(),(a).end()

#define CHMIN(a,b) a=min((a),(b))
#define CHMAX(a,b) a=max((a),(b))

// mod
const ll MOD = 1000000007ll;
#define FIX(a) ((a)%MOD+MOD)%MOD

// floating
typedef double Real;
const Real EPS = 1e-11;
#define EQ0(x) (abs(x)<EPS)
#define EQ(a,b) (abs(a-b)<EPS)
typedef complex<Real> P;

int n,m;
int q;
int a[125252];
bool used[125252];
int t[125252];
int t_i;
int rev[125252];
int cnt[125252];

int main(){
  scanf("%d%d%d",&n,&m,&q);
  REP(i,q)scanf("%d",a+i),--a[i];
  // calc target sequence
  t_i = 0;
  FORR(i,0,q){
    int c = a[i];
    if(used[c])continue;
    used[c] = true;
    t[t_i++] = c;
  }
  REP(i,m){
    if(!used[i])t[t_i++] = i;
  }
  REP(i,m){
    rev[t[i]] = i;
  }
  // split
  cnt[0] = n;
  FORR(i,0,q){
    int c = a[i];
    int id = rev[c];
    if(cnt[id]>0){
      cnt[id]--;
      cnt[id+1]++;
    }
  }
  REP(i,m){
    if(cnt[i]>0){
      bool flag = true;
      FOR(j,i,m-1){
        if(t[j]>t[j+1]){
          flag = false;
          break;
        }
      }
      puts(flag?"Yes":"No");
      break;
    }
    if(i==m-1){
      puts("Yes");
      break;
    }
  }
  return 0;
}
