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