#include <bits/stdc++.h>   using namespace std;   int main() {     long long int n, m;     cin >> n >> m;     long long int a[m];     for (int i = 0; i < m; i++) {       cin >> a[i];     }     sort(a, a + m);     int i = 0;     while (i < m - 2) {       if (a[i] + 1 == a[i + 1] && a[i + 1] + 1 == a[i + 2]) {         cout <<  NO n ;         return 0;       }       i++;     }     if (a[0] == 1 || a[m - 1] == n) {       cout <<  NO n ;       return 0;     }     cout <<  YES n ;     return 0;   }   