#include <bits/stdc++.h>
using namespace std;
int mod = 1e9 + 7;
bool prime[1000001] = {true};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m;
  cin >> n >> m;
  vector<int> arr(m);
  if (m == 0) {
    cout << "YES";
    return 0;
  }
  for (int i = 0; i < m; i++) {
    cin >> arr[i];
  }
  sort(arr.begin(), arr.end());
  if (arr[0] == 1 || arr[m - 1] == n) {
    cout << "NO";
    return 0;
  } else {
    for (int i = 0; i < m - 1; i++) {
      if (i < m - 2 && arr[i] + 1 == arr[i + 1] &&
          arr[i + 1] + 1 == arr[i + 2]) {
        cout << "NO";
        return 0;
      }
    }
    cout << "YES";
  }
  return 0;
}
