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