#include #define rep(a,n) for (ll a = 0; a < (n); ++a) using namespace std; //using namespace atcoder; using ll = long long; typedef pair P; typedef pair PP; typedef vector > Graph; 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; } const ll INF = 1e18; #define debug(v) cout<<#v<<": ",prt(v); template inline void prt(pair p){cout<<"("< inline void prt(tuple p){cout<<"("<(p)<<", "<(p)<<", "<(p)<<")\n";} inline void prt(bool p){if(p)cout<<"True"<<'\n';else cout<<"False"<<'\n';} template inline void prt(vector v){cout<<'{';for(ll i=0;i inline void prt(vector >& vv){ for(const auto& v : vv){ prt(v); } } template inline void prt(deque v){cout<<'{';for(ll i=0;i inline void prt(map v){cout<<'{';ll c=0;for(auto &p: v){cout< inline void prt(unordered_map v){cout<<'{';ll c=0;for(auto &p: v){cout< inline void prt(set v){cout<<'{';for(auto i=v.begin();i!=v.end();i++){cout<<*i;if(i!=--v.end())cout<<", ";}cout<<'}'<<'\n';} template inline void prt(multiset v){cout<<'{';for(auto i=v.begin();i!=v.end();i++){cout<<*i;if(i!=--v.end())cout<<", ";}cout<<'}'<<'\n';} int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); //input ll n,k; cin >> n >> k; vectora(k); rep(i,k)cin>>a[i]; if(n>=1000000){ bool ans = true; rep(i,k-1){ ll dif = a[i+1]-a[i]; if(dif==1||dif==3||dif==5)ans=false; } if(ans)cout<<"Yes"<dp(n+100,true); rep(i,k){ dp[a[i]]=false; } for(int i=n;i>=1;i--){ for(int j=1;j<=3;j++){ if(!dp[i+j]&&!dp[i+7-j])dp[i]=false; } } if(dp[1])cout<<"Yes"<