#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  while (cin >> n >> m) {
    int x;
    vector<int> v1(m);
    for (int i = 0; i < m; i++) cin >> v1[i];
    sort(v1.begin(), v1.end());
    if (m >= 1)
      if (v1[0] == 1 || v1[m - 1] == n) {
        cout << "NO" << endl;
        goto l;
      }
    for (int i = m - 1; i >= 2; i--) {
      if (v1[i] - v1[i - 1] == 1 && v1[i] - v1[i - 2] == 2) {
        cout << "NO" << endl;
        goto l;
      }
    }
    cout << "YES" << endl;
  l:
    continue;
  }
}
