#include #define rep(i,n) for(int i = 0; i < (int)(n); i++) #define rrep(ri,n) for(int ri = (int)(n-1); ri >= 0; ri--) #define rep2(i,x,n) for(int i = (int)(x); i < (int)(n); i++) #define rrep2(ri,x,n) for(int ri = (int)(n-1); ri >= (int)(x); ri--) #define repit(itr,x) for(auto itr = x.begin(); itr != x.end(); itr++) #define rrepit(ritr,x) for(auto ritr = x.rbegin(); ritr != x.rend(); ritr++) #define ALL(x) x.begin(), x.end() using ll = long long; using namespace std; int main(){ set se; ll n; int k; cin >> n >> k; vector in(k); rep(i, k) cin >> in.at(i); sort(ALL(in)); int mode = -1; for(auto now : in){ se.insert(now); rep(i, 3){ if(se.find(now-1-2*i) != se.end()){ // cerr << i << endl; if(mode != -1 && i != 0){ cout << "No" << endl; return 0; }else{ mode = i; int m = -1; if(mode == 0){ se.insert(now-4); se.insert(now-6); m = (now-1) % 6; }else if(mode == 1){ se.insert(now-5); se.insert(now-6); m = now % 6; }else{ if(now > 6){ m %= 6; } else m = -1; } if(m == 0 || m-3 == 0 || m-5 == 0){ cout << "No" << endl; return 0; } } } } } cout << "Yes" << endl; return 0; }