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