#include <bits/stdc++.h>
int main() {
  long long int n, m, i, j, c = 0, flag = 0;
  scanf("%lld %lld", &n, &m);
  long long int a[m];
  for (i = 0; i < m; i++) {
    scanf("%lld", &a[i]);
  }
  std::sort(a, a + m);
  for (i = 0; i < m; i++) {
    if (a[0] == 1 || a[m - 1] == n ||
        ((a[i] + 1 == a[i + 1]) && (a[i + 1] + 1 == a[i + 2]))) {
      flag = 1;
      break;
    }
  }
  if (flag == 1)
    printf("NO");
  else
    printf("YES");
}
