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