#include <bits/stdc++.h>
using namespace std;
int a[3030];
int main() {
  int n, m;
  int flag = 0;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    int x;
    scanf("%d", a + i);
  }
  sort(a, a + m);
  if (a[0] == 1 || a[m - 1] == n) {
    printf("NO\n");
    return 0;
  }
  for (int i = 0; i < m - 2; i++) {
    if (a[i] + 1 == a[i + 1] && a[i] + 2 == a[i + 2]) {
      flag = 1;
      break;
    }
  }
  if (flag)
    printf("NO\n");
  else
    printf("YES\n");
  return 0;
}
