#include <bits/stdc++.h>
using namespace std;
int tw = 0, fo = 0;
void upd(int no, vector<int> &v, bool ad) {
  int f = v[no] / 4;
  int t = (v[no] - f * 4) / 2;
  tw -= t;
  fo -= f;
  if (ad) {
    v[no]++;
  } else {
    v[no]--;
  }
  f = v[no] / 4;
  t = (v[no] - f * 4) / 2;
  tw += t;
  fo += f;
}
int main() {
  int n;
  cin >> n;
  vector<int> num(100010, 0);
  while (n--) {
    int pl;
    cin >> pl;
    upd(pl, num, true);
  }
  cin >> n;
  while (n--) {
    char c;
    int pl;
    cin >> c >> pl;
    if (c == '+') {
      upd(pl, num, true);
    } else {
      upd(pl, num, false);
    }
    if (fo >= 1 && tw >= 2 || fo > 1)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
