#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long ans = 1;
  long long n, m, a[3015];
  cin >> n >> m;
  for (long long i = 0; i < m; i++) cin >> a[i];
  sort(a, a + m);
  if (n <= 4 || m <= 2) {
    if (a[0] == 1 || a[m - 1] == n)
      cout << "NO";
    else
      cout << "YES";
  } else {
    for (long long i = 2; i < m; i++) {
      if (a[i] - a[i - 2] == 2) {
        ans = 0;
        break;
      }
    }
    if (a[0] == 1 || a[m - 1] == n || ans == 0)
      cout << "NO";
    else
      cout << "YES";
  }
}
