#include <bits/stdc++.h>
using namespace std;
inline bool isvowel(char c) {
  return (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u');
}
template <class T>
void print(const T &cont) {
  for (auto x : cont) cout << x << ' ';
  cout << '\n';
}
void input() {
  long long n, m;
  cin >> n >> m;
  if (m == 0) {
    cout << "YES";
    return;
  }
  vector<int> v(m);
  for (auto &x : v) cin >> x;
  sort(v.begin(), v.end());
  if (v[0] == 1 || v[0] == n) {
    cout << "NO";
    return;
  }
  int count = 1;
  for (int i = 1; i < m; i++) {
    if (v[i - 1] + 1 == v[i]) {
      count++;
    } else {
      count = 1;
    }
    if (count > 2 || v[i] == n) {
      cout << "NO";
      return;
    }
  }
  cout << "YES";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  while (t--) {
    input();
  }
}
