#include <bits/stdc++.h>
using namespace std;
int n, m, d[3010];
bool ok;
int main() {
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    cin >> d[i];
    if (d[i] == 1 || d[i] == n) ok = 1;
  }
  if (ok) cout << "NO\n", exit(0);
  sort(d + 1, d + 1 + m);
  for (int i = 1; i <= m - 2; i++)
    if (d[i + 2] == d[i] + 2) cout << "NO\n", exit(0);
  cout << "YES\n";
}
