#include <bits/stdc++.h>
using namespace std;
vector<int> cntr(9);
vector<int> numOfDecks(100001, 0);
void add(int a) {
  cntr[min(numOfDecks[a], 8)]--;
  numOfDecks[a]++;
  cntr[min(numOfDecks[a], 8)]++;
}
void del(int a) {
  cntr[min(numOfDecks[a], 8)]--;
  numOfDecks[a]--;
  cntr[min(numOfDecks[a], 8)]++;
}
int main() {
  int n;
  cin >> n;
  int a;
  cntr[0] = 100000;
  for (int i = 0; i < n; ++i) {
    cin >> a;
    cntr[min(numOfDecks[a], 8)]--;
    numOfDecks[a]++;
    cntr[min(numOfDecks[a], 8)]++;
  }
  int q;
  cin >> q;
  string eventSign, eventLen;
  for (int i = 0; i < q; ++i) {
    cin >> eventSign >> eventLen;
    int lenOfDeck = stoi(eventLen);
    if (eventSign == "+") {
      add(lenOfDeck);
    } else {
      del(lenOfDeck);
    }
    if (cntr[8] >= 1)
      cout << "YES" << '\n';
    else {
      if ((cntr[2] + cntr[3]) * 2 + (cntr[4] + cntr[5]) * 4 +
                  (cntr[6] + cntr[7]) * 6 >=
              8 &&
          cntr[4] + cntr[5] + cntr[6] + cntr[7] >= 1)
        cout << "YES" << '\n';
      else
        cout << "NO" << '\n';
    }
  }
  return 0;
}
