#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m;
  cin >> n >> m;
  int a[m];
  for (int i = 0; i < m; i++) cin >> a[i];
  sort(a, a + m);
  int cnt = 0;
  if (a[0] == 1 || a[m - 1] == n)
    cout << "NO"
         << "\n";
  else {
    for (int i = 0; i < m; i++) {
      if (i + 1 < m && i + 2 < m) {
        if (a[i + 1] - a[i] == a[i + 2] - a[i + 1] && a[i + 1] - a[i] == 1)
          cnt++;
      }
      if (cnt > 0) {
        cout << "NO"
             << "\n";
        break;
      }
    }
    if (cnt == 0)
      cout << "YES"
           << "\n";
  }
}
