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;

#define rep(i,x,y) for(int i=(x);i<(y);++i)
#define debug(x) #x << "=" << (x)

#ifdef DEBUG
#define _GLIBCXX_DEBUG
#define print(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl
#else
#define print(x)
#endif

const int inf=1e9;
const int64_t inf64=1e18;
const double eps=1e-9;

template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec){
    os << "[";
    for (const auto &v : vec) {
    	os << v << ",";
    }
    os << "]";
    return os;
}

void solve(){
    int n,m,q;
    cin >> n >> m >> q;
    vector<int> a(q);
    rep(i,0,q){
        cin >> a[i];
        --a[i];
    }
    reverse(a.begin(),a.end());

    vector<int> v;
    {
        vector<bool> f(m);
        rep(i,0,q){
            if(f[a[i]]) continue;
            f[a[i]]=true;
            v.push_back(a[i]);
        }
        rep(i,0,m) if(not f[i]) v.push_back(i);
    }

    vector<int> pos(m);
    rep(i,0,m) pos[v[i]]=i;

    vector<int> freq(m+1);
    freq[0]=n;
    rep(i,0,q){
        int p=pos[a[i]];
        if(not freq[p]) continue;
        --freq[p];
        ++freq[p+1];
    }
    rep(i,0,m+1){
        if(not freq[i]) continue;
        vector<int> w;
        vector<bool> f(m);
        rep(j,0,q){
            if(w.size()==i) break;
            if(f[a[j]]) continue;
            f[a[j]]=true;
            w.push_back(a[j]);
        }
        rep(j,0,m) if(not f[j]) w.push_back(j);
        if(v==w) cout << "Yes" << endl;
        else cout << "No" << endl;
        return;
    }
}

int main(){
    std::cin.tie(0);
    std::ios::sync_with_stdio(false);
    cout.setf(ios::fixed);
    cout.precision(10);
    solve();
    return 0;
}
