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