#include <bits/stdc++.h>
using namespace std;
int main() {
  bool h = true;
  long long n, m, cnt = 0;
  cin >> n >> m;
  long long* d = new long long[m];
  for (int i = 0; i < m; i++) {
    cin >> d[i];
    if (d[i] == 1 || d[i] == n) h = false;
  }
  if (!h)
    cout << "NO" << endl;
  else {
    sort(d, d + m);
    for (int x = 0; x < m - 1; x++)
      if (abs(d[x] - d[x + 1]) == 1) {
        if (abs(d[x + 1] - d[x + 2]) == 1 || abs(d[x] - d[x - 1]) == 1) cnt++;
      }
    if (cnt >= 2)
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
  return 0;
}
