#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
long long test, n, m, k, x, y, z, ans, b, a[N];
void solve() {
  cin >> n >> m;
  for (long long i = 1; i <= m; i++) cin >> a[i];
  sort(a + 1, a + m + 1);
  if (a[1] == 1 || a[m] == n) {
    cout << "NO";
    return;
  }
  for (int i = 3; i <= m; i++) {
    if (a[i - 1] == a[i] - 1 && a[i - 2] == a[i - 1] - 1) {
      cout << "NO";
      return;
    }
  }
  cout << "YES";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
}
