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