#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, x, y, b, m;
  cin >> n >> m;
  long long int a[m];
  for (long long int 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 (long long int i = 0; i < m - 2; i++) {
    if (a[i + 1] == a[i] + 1 && a[i + 2] == a[i] + 2) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
}
