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