#include <bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(false), cin.tie(0); typedef long long LL; //const int N=; int main() { IOS int n, x; int c0=0, c1=0; cin>>n; for(int i=0; i<n; i++){ cin>>x; if(x&1) c1++; else c0++; } if(c1>=1){ if(c1>=3 || c0>=2) cout<<"YES"; else cout<<"NO"; } else cout<<"NO"; return 0; }
奇数+奇数=偶数,偶数+偶数=偶数。首先三个数中必须存在奇数。其次必须有奇数个奇数。分类讨论即可