#include <bits/stdc++.h>
using namespace std;
long long int a[1000000], q, b[10000], c, d, i, j, p, m, n, k, l, t;
int main() {
  cin >> n >> m;
  for (i = 0; i < m; i++) cin >> a[i];
  sort(a, a + m);
  for (i = 0; i < m - 1; i++) {
    b[c] = a[i + 1] - a[i];
    c++;
  }
  for (i = 0; i < c; i++) {
    if (b[i] == 1)
      p++;
    else {
      if (p >= q) {
        q = p;
      }
      p = 0;
    }
  }
  if (a[m - 1] == a[m - 2]) p++;
  if (p >= q) {
    q = p;
  }
  if (q > 1 || a[0] == 1 || a[m - 1] == n)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
}
