#include <bits/stdc++.h>
using namespace std;
map<int, int> cnt;
int a[3010];
int main() {
  ios::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    cin >> a[i];
    cnt[a[i]]++;
  }
  for (int i = 0; i < m; i++) {
    if (cnt[a[i]] && cnt[a[i] + 1] && cnt[a[i] + 2] || cnt[1] || cnt[n]) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  return 0;
}
