#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 7;
int n;
int occ[N];
multiset<int> mul;
void add(int x, int d) {
  if (mul.find(occ[x]) != mul.end()) mul.erase(mul.find(occ[x]));
  occ[x] += d;
  mul.insert(occ[x]);
}
bool can() {
  if (!mul.size()) return 0;
  auto it = mul.end();
  it--;
  if ((*it) >= 8) return 1;
  if (mul.size() < 2) return 0;
  if ((*it) >= 6) {
    it--;
    if ((*it) >= 2) {
      return 1;
    }
    return 0;
  }
  if ((*it) >= 4) {
    it--;
    if ((*it) >= 4) return 1;
    if (mul.size() < 3) return 0;
    if ((*it) >= 2) {
      it--;
      if ((*it) >= 2) return 1;
    }
  }
  return 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    if (mul.find(occ[x]) != mul.end()) mul.erase(mul.find(occ[x]));
    mul.insert(++occ[x]);
  }
  int k;
  cin >> k;
  while (k--) {
    char c;
    int x;
    cin >> c >> x;
    if (c == '+') {
      add(x, 1);
    } else {
      add(x, -1);
    }
    cout << (can() ? "YES" : "NO") << "\n";
  }
  return 0;
}
