#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return (b == 0 ? a : gcd(b, a % b)); }
long long lcm(long long a, long long b) { return (a * (b / gcd(a, b))); }
int main() {
  long long n, m;
  cin >> n >> m;
  vector<int> solve(m);
  for (int i = 0; i < int(m); ++i) {
    cin >> solve[i];
    if (solve[i] == 1 || solve[i] == n) {
      cout << "NO" << endl;
      return 0;
    }
  }
  sort(solve.begin(), solve.end());
  int res = 0;
  for (int i = 0; i < int(m - 1); ++i) {
    if (solve[i + 1] - solve[i] == 1)
      res++;
    else
      res = 0;
    if (res >= 2) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  return 0;
}
