#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  int 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" << endl;
  } else {
    int count = 0;
    for (int i = 0; i < m - 2; i++) {
      if (arr[i] == arr[i + 1] - 1 && arr[i + 1] == arr[i + 2] - 1) {
        count = 2;
        break;
      }
    }
    if (count >= 2) {
      cout << "NO" << endl;
    } else {
      cout << "YES" << endl;
    }
  }
}
