#include <bits/stdc++.h>
using namespace std;
int movei[] = {0, 0, 1, -1, 1, 1, -1, -1};
int movej[] = {1, -1, 0, 0, 1, -1, 1, -1};
const double PI = acos(-1.0);
const int MXN = 1e5 + 7;
bool check(vector<int> &v, int x) {
  for (int &val : v) {
    if (val >= x) {
      val -= x;
      return true;
    }
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int n;
  cin >> n;
  vector<int> frq(1e5 + 1, 0);
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    frq[x]++;
  }
  set<pair<int, int>> pq;
  for (int i = 0; i < 1e5 + 1; i++) {
    pq.insert({-frq[i], i});
  }
  int q;
  cin >> q;
  while (q--) {
    char c;
    int x;
    cin >> c >> x;
    pq.erase({-frq[x], x});
    if (c == '+')
      frq[x]++;
    else
      frq[x]--;
    pq.insert({-frq[x], x});
    vector<int> tmp;
    for (auto it = pq.begin(); it != pq.end() && tmp.size() != 3; it++) {
      tmp.push_back(it->first * -1);
    }
    cout << ((check(tmp, 4) && check(tmp, 2) && check(tmp, 2)) ? "YES" : "NO")
         << '\n';
  }
}
