#include <bits/stdc++.h>
const long long mod = (long long)1e9 + 7;
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, m;
  cin >> n >> m;
  vector<long long> v(m);
  bool valid = true;
  for (long long i = 0; i < m; i++) {
    cin >> v[i];
    if (v[i] == n or v[i] == 1) valid = 0;
  }
  if (!valid) {
    cout << "NO"
         << "\n";
    return 0;
  }
  sort(v.begin(), v.end());
  for (long long i = 2; i < m; i++) {
    if (v[i] - 1 == v[i - 1] and v[i] - 2 == v[i - 2]) {
      valid = 0;
      break;
    }
  }
  if (valid)
    cout << "YES"
         << "\n";
  else
    cout << "NO"
         << "\n";
  return 0;
}
