#include <bits/stdc++.h>
using namespace std;
const int MAX = 5e5 + 10, mod = 1e9 + 9, base = 41, INF = 1e9 + 10, sq = 502;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  long long n, m;
  cin >> n >> m;
  long long a[m];
  for (long long i = 0; i < (m); ++i) {
    cin >> a[i];
    if (a[i] == 1 or a[i] == n) {
      cout << "NO" << endl;
      return 0;
    }
  }
  sort(a, a + m);
  if (m > 2) {
    for (long long i = 2; i <= m - 1; i++) {
      if (a[i] - a[i - 1] == 1 and a[i - 1] - a[i - 2] == 1) {
        cout << "NO" << endl;
        return 0;
      }
    }
  }
  cout << "YES" << endl;
  return 0;
}
