#include <bits/stdc++.h>
using namespace std;
const int INF = numeric_limits<int>::max();
const long long LINF = numeric_limits<long long>::max();
const double DINF = numeric_limits<double>::max();
const double eps = 1e-10;
const int MOD = 1e9 + 7;
const int MAXN = 1e5 + 5;
int a[MAXN];
void solve() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) cin >> a[i];
  sort(a, a + m);
  if (a[0] == 1 || a[m - 1] == n) {
    cout << "NO";
    return;
  }
  for (int i = 2; i < m; i++) {
    if (a[i] == a[i - 1] + 1 && a[i - 1] == a[i - 2] + 1) {
      cout << "NO";
      return;
    }
  }
  cout << "YES";
}
int main() {
  if (!1) {
    freopen(
        "474"
        ".in",
        "r", stdin);
    freopen(
        "474"
        ".out",
        "w", stdout);
  }
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) solve();
  return 0;
}
