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