#include using namespace std; using ll = long long; int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); //最大で12マス空けるように圧縮 ll p=1, A, K, N, M, L=1; cin >> N >> K; vector ng2; //dp(i)=iから始めて出目に関わらずNに行けるか? for (int i=1; i<=K; i++){ cin >> A; //p+1~A M = min(A-p, 13LL); L += M; ng2.push_back(p+M); p = A; } M = min(N-p, 13LL); L += M; vector dp(L+6); vector ng(L+6); for (auto x : ng2) ng[x] = 1; for (int i=L; i<=L+5; i++) dp[i] = 1; for (int i=L-1; i>=1; i--){ if (ng[i]) continue; dp[i] = 1; for (int j=1; j<=6; j++){ if (!dp[i+j] && !dp[i+(7-j)]) dp[i] = 0; } } cout << (dp[1] ? "Yes" : "No") << endl; return 0; }