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