#include <bits/stdc++.h>
int can[3005];
int n;
using namespace std;
int main() {
  int m;
  scanf(" %d %d", &n, &m);
  bool r = true;
  for (int i = 0; i < m; i++) {
    scanf(" %d", &can[i]);
    r = r && can[i] != 1 && can[i] != n;
  }
  if (!r) {
    printf("NO\n");
    return 0;
  }
  sort(can, can + m);
  int last = -1;
  int tam = 0;
  for (int i = 0; i < m && tam < 2; i++) {
    if (last == can[i] - 1)
      tam++;
    else
      tam = 0;
    last = can[i];
  }
  printf("%s\n", tam == 2 ? "NO" : "YES");
  return 0;
}
