func_code_string: #include <bits/stdc++.h>   using namespace std;   const long long M = 200100;   long long b[M];   long long fre[M];   int main() {     long long n;     cin >> n;     vector<long long> a(n);     for (int i = 0; i < n; i++) {       cin >> a[i];       b[a[i]]++;       fre[b[a[i]]]++;     }     long long q;     cin >> q;     while (q--) {       char s;       long long x;       cin >> s >> x;       if (s ==  + ) {         b[x]++;         fre[b[x]]++;       } else {         assert(b[x] > 0);         fre[b[x]]--;         b[x]--;       }       if ((fre[8] > 0) || (fre[4] >= 2) || (fre[2] >= 2 && fre[6] > 0) ||           (fre[2] >= 3 && fre[4] > 0))         cout <<  YES  << endl;       else         cout <<  NO  << endl;     }   }   