#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  map<long long, bool> mp;
  vector<long long> v;
  for (int i = 0; i < m; i++) {
    long long x;
    cin >> x;
    mp[x] = 1;
    v.push_back(x);
  }
  vector<long long>::iterator iter;
  bool flag = false;
  for (iter = v.begin(); iter != v.end(); iter++) {
    if (mp[*iter + 1] && mp[*iter + 2]) {
      flag = true;
      break;
    }
  }
  if (mp[1] || mp[n]) {
    flag = true;
  }
  if (flag) {
    cout << "NO\n";
  } else {
    cout << "YES\n";
  }
  return 0;
}
