#include <bits/stdc++.h>
using namespace std;
int main(void) {
  bool status = true;
  int N, M;
  scanf("%d%d", &N, &M);
  int A[M + 1];
  for (int i = 1; i <= M; i++) {
    scanf("%d", &A[i]);
  }
  sort(A + 1, A + M + 1);
  if (A[1] == 1 || A[M] == N) {
    status = false;
  } else {
    for (int i = 1; i <= M - 2; i++) {
      if (A[i] == A[i + 1] - 1 && A[i + 1] == A[i + 2] - 1) {
        status = false;
      }
    }
  }
  printf("%s\n", status ? "YES" : "NO");
  return 0;
}
