#include <bits/stdc++.h>
using namespace std;
int x[5000];
int main() {
  int n, m;
  bool ch = true;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) scanf("%d", &x[i]);
  sort(x + 1, x + m + 1);
  for (int i = 2; i < m; i++)
    if (x[i - 1] == x[i] - 1 && x[i + 1] == x[i] + 1) ch = false;
  if (ch && x[1] != 1 && x[m] != n)
    printf("YES");
  else
    printf("NO");
}
