#include <bits/stdc++.h>
using namespace std;
const long long MAX_SIZE = ((long long)1e6 + 5);
vector<long long> isprime(MAX_SIZE, true);
vector<long long> prime;
vector<long long> SPF(MAX_SIZE);
signed main() {
  long long n, m;
  cin >> n >> m;
  long long a[m];
  bool ans = true;
  for (long long i = 0; i < m; i++) {
    cin >> a[i];
    if (a[i] == n || a[i] == 1) ans = false;
  }
  sort(a, a + m);
  for (long long i = 0; i < m - 2; i++) {
    if (a[i] + 1 == a[i + 1] && a[i] + 2 == a[i + 2]) ans = false;
  }
  if (ans)
    cout << "YES\n";
  else
    cout << "NO\n";
}
