func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int n, a, maxi = 0;     cin >> n;     std::stack<int> stk;     for (int i = 0; i < n; ++i) {       cin >> a;       a %= 2;       maxi = max(maxi, a);       if (!stk.empty()) {         if (stk.top() == a)           stk.pop();         else           stk.push(a);       } else         stk.push(a);     }     if (stk.size() < 2)       cout <<  YES ;     else       cout <<  NO ;     return 0;   }   