#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  long n, m;
  cin >> n >> m;
  long dirty[m];
  for (long i = 0; i < m; ++i) cin >> dirty[i];
  sort(dirty, dirty + m);
  if (dirty[0] == 1 || dirty[m - 1] == n) cout << "NO";
  if (!(dirty[0] == 1 || dirty[m - 1] == n)) {
    int k = 0;
    for (long i = 1; i < m - 1; ++i) {
      if (dirty[i + 1] - dirty[i] == 1 && dirty[i] - dirty[i - 1] == 1) {
        cout << "NO";
        ++k;
        break;
      }
    }
    if (k != 1) cout << "YES";
  }
}
