#include <bits/stdc++.h>
using namespace std;
void nhap(int &k) { cin >> k; }
void nhapMang(int a[], int m) {
  for (int i = 0; i < m; i++) cin >> a[i];
}
void process(int a[], int m, int n) {
  sort(a, a + m);
  int temp = 0;
  for (int i = 0; i < m; i++) {
    if (i != 0) {
      if (a[i] == a[i - 1] + 1)
        temp++;
      else
        temp = 0;
    }
    if (temp == 2 || a[i] == n || a[i] == 1) {
      cout << "NO";
      return;
    }
  }
  cout << "YES";
}
int main() {
  int n, m;
  nhap(n);
  nhap(m);
  int mang[m];
  nhapMang(mang, m);
  process(mang, m, n);
  return 0;
}
