Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- #define int long long
- #define fastIO() ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
- int32_t main() {
- fastIO();
- int n;
- cin >> n;
- vector<int> v(n), ans;
- for (auto &x : v) {
- cin >> x;
- if (~x & 1) ans.push_back(x);
- }
- sort(ans.begin(), ans.end());
- if (ans.empty() or ans.size() == 1) cout << "NO\n";
- else if (ans.size() & 1) cout << "OuO\n" << ans[0] << "\n";
- else {
- cout << "YES\n";
- int sz = ans.size();
- for (int i = 0; i < sz; ++i) {
- cout << ans[i] << " \n"[i == sz-1];
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement