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