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