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