#include <bits/stdc++.h>
using namespace std;
long long int fact(long long int n) {
  if (n == 0 || n == 1)
    return 1;
  else
    return n * fact(n - 1);
}
int main() {
  int n, s, t;
  cin >> n >> s;
  vector<int> v;
  if (s == 0) {
    cout << "YES";
  } else {
    for (int i = 0; i < s; i++) {
      cin >> t;
      v.push_back(t);
    }
    sort(v.begin(), v.end());
    int cnt = 1, m = 0;
    for (int i = 0; i < s - 1; i++) {
      if (v[i + 1] == v[i] + 1) {
        while (v[i + 1] == v[i] + 1) {
          cnt++;
          i++;
        }
        if (cnt > m) m = cnt;
        cnt = 1;
      }
    }
    if (m >= 3 || v[0] == 1 || v[s - 1] == n)
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
  return 0;
}
