#include <bits/stdc++.h>
using namespace std;
int home[100007];
int away[100007];
void vin(vector<long long> &v, int n) {
  long long temp;
  while (n--) {
    cin >> temp;
    v.push_back(temp);
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n, m;
  cin >> n >> m;
  vector<long long> v;
  vin(v, m);
  sort((v).begin(), (v).end());
  if (m > 0 && (v[0] == 1 || v[m - 1] == n))
    cout << "NO";
  else {
    int flag = 1;
    long long i = 0;
    for (; i < m - 2; i++) {
      long long a = v[i + 1] - v[i] - 1;
      long long b = v[i + 2] - v[i] - 2;
      if (!a && !b) {
        flag = 0;
        break;
      }
    }
    if (flag)
      cout << "YES";
    else
      cout << "NO";
  }
  return 0;
}
