#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int64_t n;
  int m, a[4000];
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    cin >> a[i];
  }
  sort(a, a + m);
  if (a[0] == 1 || a[m - 1] == n) {
    cout << "NO" << endl;
    return 0;
  }
  for (int i = 0; i < m; i++) {
    if (a[i] + 1 == a[i + 1] && a[i] + 2 == a[i + 2]) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  return 0;
}
