#include using namespace std; #define REP(i,n) for(int i=0; i<(int)(n); i++) int dp[61][1<<6]; int main() { ios_base::sync_with_stdio(0); cin.tie(0); for (int cur = 0; cur < 1<<6; cur++) { int nxt = (cur << 1) & ((1<<6) - 1); bool ok = true; for (int i = 0; i < 3; i++) { int j = 5 - i; bool safe = (cur & 1<> n >> k; vector a(k); for (int i = 0; i < k; i++) cin >> a[i]; reverse(a.begin(), a.end()); a.push_back(1); int cur = (1<<6) - 1; for (int i = 0; i < a.size(); i++) { for (int b = 60; b >= 0; b--) { long long bit = 1LL<= bit) { cur = dp[b][cur]; n -= bit; } } if (a[i] > 1) cur &= ~1; } if (cur & 1) cout << "Yes" << endl; else cout << "No" << endl; return 0; }