#include using namespace std; #define ALL(x) begin(x),end(x) #define rep(i,n) for(int i=0;i<(n);i++) #define debug(v) cout<<#v<<":";for(auto x:v){cout<bool chmax(T &a,const T &b){if(abool chmin(T &a,const T &b){if(b ostream &operator<<(ostream &os,const vector&v){ for(int i=0;i<(int)v.size();i++) os< istream &operator>>(istream &is,vector&v){ for(T &x:v)is>>x; return is; } signed main(){ ll n,k;cin>>n>>k; vector a(k); cin>>a; set st; rep(i,k) st.insert(a[i]); bool update=true; while(update){ update=false; rep(i,(int)a.size()){ for(int j=i+1;j<(int)a.size();j++){ if(abs(a[i]-a[j])>=15000000) break; for(int x=1;x<=6;x++){ if(a[i]-x!=a[j]+x-7) continue; ll p=a[i]-x; if(!(1<=p and p<=n)) continue; if(st.count(p)) continue; a.push_back(p); st.insert(p); update=true; } } } } if(st.count(1)) cout<<"No"<