#include #if __has_include() #include using namespace atcoder; #endif using namespace std; #define rep(i, n) for(int i=0, i##_len=(n); i=0; --i) #define rreps(i, n) for(int i=((int)(n)); i>0; --i) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define sz(x) ((int)(x).size()) #define pl(s) cout << (s) << "\n"; #define pls(...) {bool space = false; for(auto i : __VA_ARGS__) (cout << (space?" ":"") << i), space = true; cout << "\n";} #define plexit(s) {cout << (s) << "\n"; exit(0);} #define yes(s) cout << ((s)?"Yes":"No") << "\n"; #ifdef __LOCAL #include #define dump(...) DUMPOUT << " " << string(#__VA_ARGS__) << ": " << "[" << to_string(__LINE__) << ":" << __FUNCTION__ << "]" << endl << " ", dump_func(__VA_ARGS__) #else #define dump(...) #endif template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } struct IOInit { IOInit() { cin.tie(nullptr); ios::sync_with_stdio(false); dump("READY"); /*cout << unitbuf;*/} } IO_INIT; using ll = long long; using ull = unsigned long long; using ld = long double; template using V = vector; template using P = pair; using Vi = V; using Vl = V; using Vd = V; using VVi = V; using VVl = V; using Pi = P; using Pl = P; using Pd = P; constexpr ll MOD = 1000000007; constexpr int INF = (1 << 30) - 1; constexpr ll INFL = 1LL << 60; constexpr ld EPS = 1e-12; constexpr ld PI = 3.141592653589793238462643383279; signed main(void) { ll n; int k; cin >> n >> k; set s; rep(i,k) {ll a; cin >> a; s.insert(a);} ll a = *s.rbegin(); while(1) { int x = 0; rep(t, 3) { --a; if (s.count(a) || s.count(a+1) && s.count(a+6) || s.count(a+2) && s.count(a+5) || s.count(a+3) && s.count(a+4)) { s.insert(a); ++x; if (x == 4) { if (a >= 1) s.insert(1LL); break; } t = -1; } else x = 0; } auto it = s.lower_bound(a); if (it == s.begin()) break; a = *(--it); } yes(!s.count(1)) return 0; }