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