#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> vec(m);
  for (int i = 0; i < m; i++) cin >> vec[i];
  if (m == 0) {
    cout << "YES" << endl;
    return 0;
  }
  sort(vec.begin(), vec.end());
  if (vec[0] == 1 || vec[m - 1] == n) {
    cout << "NO" << endl;
    return 0;
  }
  int count = 0;
  for (int i = 1; i < m; i++) {
    if (vec[i] - vec[i - 1] == 1)
      count++;
    else
      count = 0;
    if (count == 2) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
}
