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