#include <bits/stdc++.h>
using namespace std;
template <typename T>
T Abs(T x) {
  return x > 0 ? x : -x;
}
template <typename T>
T const& Max(T const& a, T const& b) {
  return a > b ? a : b;
}
template <typename T>
T const& Min(T const& a, T const& b) {
  return a < b ? a : b;
}
template <typename T>
inline T gcd(T a, T b) {
  return (b ? gcd(b, a % b) : a);
}
template <typename T>
T sqaa(T a) {
  return a * a;
}
int main() {
  int n, m, h;
  set<int> KK;
  while (cin >> n >> m) {
    bool fl = true;
    ;
    KK.clear();
    for (int i = (0); i < (m); i++) {
      cin >> h;
      KK.insert(h);
    }
    if (KK.find(1) != KK.end() || KK.find(n) != KK.end()) fl = false;
    for (int x : KK) {
      if (KK.find(x + 1) != KK.end() && KK.find(x + 2) != KK.end()) {
        fl = false;
        break;
      }
    }
    if (fl)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
