#include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define srep(i, s, n) for (int i=(s); i < (int)(n); i++) #define all(v) v.begin(), v.end() #define fore(i,x) for(auto i:x) #define pb push_back using vi=vector; using vvi=vector; using vb=vector; using vvb=vector; using vs=vector; using vll=vector; using vvll=vector; using vc=vector; using vvc=vector; using ll=long long; void Yes(bool ok){ cout << (ok ? "Yes" : "No") << "\n";} int main(){ ll N,K; cin >> N >> K; vll A(K); rep(i,K) cin >> A.at(i); vb GO(30); rep(i,K-1){ ll d=A.at(i+1)-A.at(i); if(d==1 || d==3 || d==5){ if(A.at(i)<=20){ GO.at(A.at(i+1))=true; GO.at(A.at(i))=true; for(int j=24;j>=0;j--){ if(j-3>=0){ if(GO.at(j) && GO.at(j+1)) GO.at(j-3)=true; } if(j-2>=0){ if(GO.at(j) && GO.at(j+3)) GO.at(j-2)=true; } if(j-1>=0){ if(GO.at(j) && GO.at(j+5)) GO.at(j-1)=true; } } } else GO.at(1)=true; } } Yes(!GO.at(1)); }