#include <bits/stdc++.h>
using namespace std;
const int SIZE = 2e5 + 4;
const int d4x[] = {1, -1, 0, 0};
const int d4y[] = {0, 0, 1, -1};
const int d8x[] = {1, 0, -1, 0, 1, -1, -1, 1};
const int d8y[] = {0, 1, 0, -1, 1, 1, -1, -1};
void fastio() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
void solveTest() {
  int n, m;
  cin >> n >> m;
  if (m == 0) {
    cout << "YES" << endl;
    return;
  }
  vector<int> v(m);
  for (int i = 0; i < m; i++) {
    cin >> v[i];
  }
  sort(v.begin(), v.end());
  long long c = 0;
  if (v[0] == 1 || v[m - 1] == n) {
    cout << "NO" << endl;
    return;
  }
  long long dif = 0;
  for (int i = 1; i < m; i++) {
    if (v[i] - v[i - 1] == 1) {
      c++;
    } else {
      c = 0;
    }
    dif = max(dif, c);
  }
  if (dif >= 2) {
    cout << "NO" << endl;
    return;
  }
  cout << "YES" << endl;
  return;
}
int main() {
  fastio();
  solveTest();
  return 0;
}
