#pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include using namespace std; using ll = long long; const int INF = 1e9; const ll inf = 1LL<<62; void solve() { ll n; cin >> n; auto gcd = [](auto&& gcd, ll x, ll y) -> ll { if (x == 0 || y == 0) return x+y; if (x%y) return gcd(gcd, y, x%y); return y; }; ll g = 0; int cnt = 0; vector a; for (int i=0; i> A; if (A == 0) cnt++; else a.emplace_back(A); } if (a.size() <= 2) { cout << "Yes" << '\n'; return; } sort(a.begin(), a.end()); for (int i=1; i cnt) { cout << "No" << '\n'; return; } cnt -= p; } cout << "Yes" << '\n'; } int main() { ios::sync_with_stdio(false); std::cin.tie(nullptr); // int t; cin >> t; /*while (t--)*/ solve(); }