#include <bits/stdc++.h>
using namespace std;
const long long remi = 1000000007;
const long long remi2 = 998244353;
const long long inf = 1e18 + 1e17 + 1e16 + 1e15 + 1e14;
long long Pow(long long x, long long y, long long m) {
  if (y == 0) return 1;
  long long p = Pow(x, y / 2, m) % m;
  p = (p * p) % m;
  return (y % 2 == 0) ? p : (x * p) % m;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long i, j, k;
  long long n, m;
  cin >> n >> m;
  vector<long long> v(m);
  for (i = 0; i < m; i++) {
    cin >> v[i];
  }
  sort(v.begin(), v.end());
  bool ans = true;
  if (m == 0) {
    cout << "YES";
    exit(0);
  }
  if (v[0] == 1 or v[m - 1] == n) ans = false;
  for (i = 2; i < m; i++) {
    long long s0 = v[i - 2];
    long long s1 = v[i - 1];
    long long s2 = v[i];
    if ((s0 == s2 - 2) and (s1 == s2 - 1)) ans = false;
  }
  if (ans)
    cout << "YES";
  else
    cout << "NO";
}
