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 unsigned long long ull;
typedef long double ld;
typedef pair<ll, ll> P;

#define EACH(i,a) for (auto& i : a)
#define FOR(i,a,b) for (ll i=(a);i<(b);i++)
#define RFOR(i,a,b) for (ll i=(b)-1;i>=(a);i--)
#define REP(i,n) for (ll i=0;i<(n);i++)
#define RREP(i,n) for (ll i=(n)-1;i>=0;i--)
#define debug(x) cout<<#x<<": "<<x<<endl
#define pb push_back
#define ALL(a) (a).begin(),(a).end()

const ll linf = 1e18;
const ll inf = 1e9;
const double eps = 1e-12;
const double pi = acos(-1);

template<typename T>
istream& operator>>(istream& is, vector<T>& vec) {
    EACH(x,vec) is >> x;
    return is;
}
template<typename T>
ostream& operator<<(ostream& os, vector<T>& vec) {
    REP(i,vec.size()) {
        if (i) os << " ";
        os << vec[i];
    }
    return os;
}
template<typename T>
ostream& operator<<(ostream& os, vector< vector<T> >& vec) {
    REP(i,vec.size()) {
        if (i) os << endl;
        os << vec[i];
    }
    return os;
}

int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(0);
    ll n, m; cin >> n >> m;
    ll Q; cin >> Q;
    vector<ll> a(Q); cin >> a; REP(i, Q) a[i]--;
    vector<ll> seq = [&]() {
        set<ll> used;
        vector<ll> res;
        RREP(i, Q) {
            if (used.count(a[i]) == 0) {
                res.pb(a[i]);
                used.insert(a[i]);
            }
        }
        REP(i, m) if ( used.count(i) == 0 ) res.pb(i);
        return res;
    }();

    vector<ll> rseq(m); REP(i, m) rseq[seq[i]] = i;
    vector<ll> cnt(m+1, 0); cnt[0] = n;
    // int skipped = 0;
    RREP(i, Q) {
        ll pos = rseq[a[i]];
        if (cnt[pos] > 0) --cnt[pos], ++cnt[pos+1];
        // else ++skipped;
    }
    bool ans = true;
    // if (skipped > 0 && cnt[m] == 0 && cnt[m-1] == 0) {
    //     ans = false;
    // }
    // cout << seq << endl;
    // cout << cnt << endl;
    // cout << def << endl;
    REP(i, m) {
        if (cnt[i] > 0) {
            FOR(j, i, m-1) {
                if (seq[j+1] < seq[j]) ans = false;
            }
            break;
        }
    }
    if (ans) {
        cout << "Yes" << endl;
    }
    else {
        cout << "No" << endl;
    }
}
