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;

void No() {
    cout << "No\n";
    exit(0);
}

int main() {
	ios_base::sync_with_stdio(0);
	int n, m, q;
    cin >> n >> m >> q;
    vector<int> qs(q, 0);
    for (int i = 0; i < q; ++i) {
        cin >> qs[i];
        qs[i]--;
    }

    reverse(qs.begin(), qs.end());
    vector<int> used(m, 0), seq;
    for (int i = 0; i < q; ++i)
        if (!used[qs[i]]) {
            seq.push_back(qs[i]);
            used[qs[i]] = 1;
        }

    for (int i = 0; i < m; ++i)
        if (!used[i])
            seq.push_back(i);
    vector<int> myNum(m, -1);
    for (int i = 0; i < m; ++i) {
        myNum[seq[i]] = i;
    //    cerr << seq[i] << ' ';
    }
    //cerr << "\n";

    int ind = m-1;
    while (ind > 0 && seq[ind] > seq[ind-1])
        --ind;
    vector<int> kol(m+1, 0);
    kol[0] = n;
    bool weCan = false;
    for (int i = 0; i < q; ++i) {
        int v = qs[i];
        int pos = myNum[v] + 1;
        if (pos > ind) {
            if (!weCan && kol[pos-1] == kol[pos])
                No();
            weCan = true;
            kol[pos] += 1;
        }
        else {
            kol[pos] = min(kol[pos-1], kol[pos] + 1);
        }
    }

    //cerr << ind << ' ' << kol[ind] << "\n";
    if (kol[ind] < n)
        No();
    cout << "Yes\n"; 
	return 0;
}