#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long int i, l, n, m, t;
  cin >> n >> m;
  long int a[m + 1];
  for (i = 0; i < m; i++) cin >> a[i];
  sort(a, a + m);
  bool flag = true;
  if (a[0] == 1) flag = false;
  if (a[m - 1] == n) flag = false;
  for (i = 0; i < m - 2; i++)
    if (a[i] == a[i + 1] - 1 && a[i + 1] + 1 == a[i + 2]) flag = false;
  if (!flag)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
}
