#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n, m, st;
  cin >> n >> m;
  if (m == 0) {
    cout << "YES" << '\n';
    return 0;
  }
  vector<int> v;
  for (int i = 0; i < m; i++) {
    cin >> st;
    v.push_back(st);
  }
  sort(v.begin(), v.end());
  if (v[0] == 1 || v[m - 1] == n) {
    cout << "NO" << '\n';
    return 0;
  }
  int cnt = 0;
  v.push_back(3030);
  for (int i = 0; i < m; i++) {
    if ((v[i + 1] - v[i]) == 1)
      cnt++;
    else
      cnt = 0;
    if (cnt == 2) {
      cout << "NO" << '\n';
      return 0;
    }
  }
  cout << "YES" << '\n';
  return 0;
}
