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>
  
#define FOR(i,a,b) for( ll i = (a); i < (ll)(b); i++ )
#define REP(i,n) FOR(i,0,n)
#define YYS(x,arr) for(auto& x:arr)
#define ALL(x) (x).begin(),(x).end()
#define SORT(x) sort( (x).begin(),(x).end() )
#define REVERSE(x) reverse( (x).begin(),(x).end() )
#define UNIQUE(x) (x).erase( unique( ALL( (x) ) ) , (x).end() )
#define PW(x) (1LL<<(x))
#define SZ(x) ((ll)(x).size())
#define SHOW(x) cout << #x << " = " << x << endl
 
#define pb emplace_back
#define fi first
#define se second

using namespace std;
 
typedef long double ld;
typedef long long int ll;
typedef pair<int,int> pi;
typedef pair<ll,ll> pl;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<bool> vb;
typedef vector<ld> vd;
typedef vector<pi> vpi;
typedef vector<pl> vpl;
typedef vector<vpl> gr;
typedef vector<vl> ml;
typedef vector<vd> md;
typedef vector<vi> mi;
 
const ll INF = (ll)1e9 + 10;
const ll INFLL = (ll)1e18 + 10;
const ld EPS = 1e-8;
const ll MOD = 1e9+7;

template<class T> T &chmin( T &a , const T &b ){ return a = min(a,b); }
template<class T> T &chmax( T &a , const T &b ){ return a = max(a,b); }
template<class T> inline T sq( T a ){ return a * a; }
ll in(){ ll x; scanf( "%lld" , &x ); return x; }
 
// head

ll n, m;
ll q;

ll a[100010];
ll t;

vl v, x;

set<ll> ss[100010];

bool used[100010];

int no(){
  puts( "No" );
  return 0;
}

int main(){

  scanf( "%lld %lld" , &n , &m );
  scanf( "%lld" , &q );
  REP( i , q ) scanf( "%lld" , &a[i] );
  
  for( ll i = m; i >= 1; i-- ) v.pb( i );
  REP( i , q ) v.pb( a[i] );

  REP( i , q ) ss[ a[i] ].insert( i );

  for( ll i = SZ(v)-1; i >= 0; i-- ){
    if( !used[v[i]] ){
      used[ v[i] ] = true;
      x.pb( v[i] );
      if( i >= m ){
	assert( ss[ v[i] ].find( i-m ) != ss[ v[i] ].end() );
	ss[ v[i] ].erase( ss[ v[i] ].find( i-m ) );
      }
    }
  }
  
  for( ll i = SZ(x)-2; i >= 0; i-- ){
    if( x[i] > x[i+1] ){
      t = i+1;
      break;
    }
  }
  
  if( t * n  > q ) return no();

  REP( i , n-1 ){
    ll cur = q;
    REP( j , t ){
      auto ite = ss[ x[j] ].lower_bound( cur );
      if( ite == ss[ x[j] ].begin() ) return no();
      ite--;
      cur = *ite;
      ss[ x[j] ].erase( ite );
    }
  }

  puts( "Yes" );
  
  return 0;
}
