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