#include <bits/stdc++.h>
using namespace std;
void ram5564() {
  long long n, m;
  cin >> n >> m;
  vector<long long> v;
  long long ok = 0;
  for (long long i = 0; i < m; ++i) {
    long long x;
    cin >> x;
    if (x == 1 || x == n) ok = 1;
    v.push_back(x);
  }
  sort(v.begin(), v.end());
  if (ok) {
    cout << "NO\n";
    return;
  }
  if (m < 3) {
    cout << "YES";
    return;
  }
  for (long long i = 0; i < v.size() - 2; ++i) {
    if (v[i + 1] == v[i] + 1 && v[i] + 2 == v[i + 2]) {
      cout << "NO\n";
      return;
    }
  }
  cout << "YES\n";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) ram5564();
  return 0;
}
