#include <bits/stdc++.h>
using namespace std;
int n, m;
int d[4000];
int main() {
  while (cin >> n >> m) {
    for (int i = 1; i <= m; ++i) cin >> d[i];
    sort(d + 1, d + 1 + m);
    if (d[1] == 1 || d[m] == n) {
      puts("NO");
      continue;
    }
    bool flag = false;
    for (int i = 2; i <= m; ++i)
      if (d[i] - d[i - 2] == 2) flag = true;
    if (!flag)
      puts("YES");
    else
      puts("NO");
  }
  return 0;
}
