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