#include <bits/stdc++.h>
using namespace std;
long long a[100009];
int main() {
  long long n, d;
  cin >> n >> d;
  for (int i = 1; i <= d; i++) {
    cin >> a[i];
    if (a[i] == 1 || a[i] == n) {
      cout << "NO" << endl;
      return 0;
    }
  }
  sort(a + 1, a + d + 1);
  bool b = 0;
  long long res = 1;
  for (int i = d; i > 1; i--) {
    if (a[i] - 1 == a[i - 1]) {
      res++;
    } else
      res = 1;
    if (res >= 3) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  return 0;
}
