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