#include <bits/stdc++.h>
int main() {
  int n, m;
  std::cin >> n >> m;
  std::vector<int> xs{-1, 0, n + 1, n + 2};
  for (int i; std::cin >> i; xs.push_back(i))
    ;
  std::sort(xs.begin(), xs.end());
  for (int i = 0; i + 2 < xs.size(); ++i)
    if (xs[i + 2] == xs[i] + 2) return std::cout << "NO\n", 0;
  std::cout << "YES\n";
}
