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