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