#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;

const int M = 100100;

int n, m, q;
int a[M];
bool used[M];
int cnt[M];
int ord[M];
vector<int> seq;

void read() {
  cin >> n >> m >> q;
  for (int i = 0; i < q; ++i) {
    cin >> a[i];
    --a[i];
  }
  reverse(a, a + q);
}

void nx(int i) {
  assert(i < m);
  if (cnt[i] > 0) {
    --cnt[i];
    ++cnt[i + 1];
  }
}

void add(int x) {
  if (!used[x]) {
    int f = seq.size();

    used[x] = true;
    ord[x] = f;

    nx(f);
    seq.push_back(x);
  } else {
    int k = ord[x];
    nx(k);
  }
}

void kill() {
  cnt[0] = n;

  for (int i = 0; i < q; ++i)
    add(a[i]);

  for (int i = 0; i < m; ++i)
    if (!used[i])
      seq.push_back(i);

  int sh = 0;
  while (!cnt[sh])
    ++sh;
  
  auto alt = seq;
  sort(alt.begin() + sh, alt.end());

  if (alt == seq) {
    cout << "Yes\n";
  } else {
    cout << "No\n";
  }
}

int main() {
  cout.precision(20);
  cout << fixed;
  ios_base::sync_with_stdio(false);
  read();
  kill();
}
