#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> v(m);
  if (m == 0) {
    cout << "YES\n";
    exit(0);
  }
  for (int i = 0; i < m; ++i) {
    cin >> v[i];
  }
  sort(v.begin(), v.end());
  if (v[0] == 1 || v[m - 1] == n) {
    cout << "NO\n";
  } else {
    int flag = 0;
    for (int i = 0; i + 2 < m; ++i) {
      if (v[i] + 1 == v[i + 1] && v[i + 1] + 1 == v[i + 2]) {
        ++flag;
        break;
      }
    }
    if (flag)
      cout << "NO\n";
    else
      cout << "YES\n";
  }
  return 0;
}
