#include <bits/stdc++.h>
using namespace std;
const long long int inf = 1e18;
long long int a[1000005];
long long int n, m, k, d, l, i, w, r, j, x, y, in1, in2, h, f,
    mn = LLONG_MAX, mx = 0, t, c, q, ans;
map<char, int> mp;
string z;
map<long long int, long long int>::iterator it;
map<long long int, long long int>::reverse_iterator rt;
vector<string> v;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> m;
  for (i = 0; i < m; i++) cin >> a[i];
  sort(a, a + m);
  if (a[0] == 1 || a[m - 1] == n) {
    cout << "NO";
    return 0;
  }
  for (i = 0; i < m; i++) {
    if (a[i + 2] - a[i + 1] == 1 && a[i + 1] - a[i] == 1) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
}
