#include <bits/stdc++.h>
using namespace std;
string tostr(long long a) {
  stringstream rr;
  rr << a;
  return rr.str();
}
long long pow(long long c, long long d) { return d == 0 ?: c * pow(c, d - 1); }
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return ((a * b) / gcd(a, b)); }
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  vector<long long> v(n), cnt(100009);
  map<long long, long long> mp;
  long long two = 0, four = 0, eight = 0, six = 0;
  set<long long> st;
  for (long long i = 0; i < n; i++) {
    cin >> v[i];
    st.insert(v[i]);
    cnt[v[i]]++;
  }
  for (auto& it : st) {
    long long x = it;
    if (cnt[x] >= 8)
      eight++;
    else if (cnt[x] >= 6)
      six++;
    else if (cnt[x] >= 4)
      four++;
    else if (cnt[x] >= 2)
      two++;
  }
  long long q;
  cin >> q;
  while (q--) {
    char ch;
    cin >> ch;
    long long x;
    cin >> x;
    if (ch == '+') {
      cnt[x]++;
      if (cnt[x] == 2) two++;
      if (cnt[x] == 4) {
        four++;
        two--;
      }
      if (cnt[x] == 6) {
        six++;
        four--;
      }
      if (cnt[x] == 8) {
        eight++;
        six--;
      }
    } else {
      cnt[x]--;
      if (cnt[x] == 1) two--;
      if (cnt[x] == 3) {
        four--;
        two++;
      }
      if (cnt[x] == 5) {
        six--;
        four++;
      }
      if (cnt[x] == 7) {
        eight--;
        six++;
      }
    }
    bool ok = false;
    if (eight > 0) ok = true;
    if (four > 1) ok = true;
    if (six > 1) ok = true;
    if (six > 0 && two > 0) ok = true;
    if (six > 0 && four > 0) ok = true;
    if (four > 0 && two > 1) ok = true;
    if (ok)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
