#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
long long int t, n, m, a[1000005] = {0};
map<long long int, long long int> mp;
multiset<pair<long long int, long long int> > s;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int i, j, k, x, y;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> x;
    mp[x]++;
  }
  for (auto it : mp) s.insert({it.second, it.first});
  cin >> t;
  while (t--) {
    char ch;
    cin >> ch >> x;
    s.erase({mp[x], x});
    if (ch == '+')
      mp[x]++;
    else
      mp[x]--;
    if (mp[x] != 0) s.insert({mp[x], x});
    if (((long long int)s.size()) == 0) {
      cout << "NO\n";
      continue;
    }
    auto it = s.end();
    it--;
    long long int ss = 0, rr = 0, req = 2;
    while (1) {
      if ((ss && rr) || it->first < 2) break;
      x = it->first;
      if (ss == 0) {
        if (it->first < 4) break;
        ss = 1;
        x -= 4;
      }
      if (rr == 0) {
        if (x >= 4) {
          rr = 1;
          req = 0;
        } else if (x >= 2) {
          req--;
          if (req == 0) rr = 1;
        }
      }
      if (it == s.begin()) break;
      it--;
    }
    if (ss && rr)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
