#include <bits/stdc++.h>
using namespace std;
const int MX = 1e5 + 5;
int main() {
  long long n, q, x, i;
  cin >> n;
  long long a[MX];
  set<long long> eight, six, four, two;
  for (i = 0; i < MX; i++) a[i] = 0;
  for (i = 0; i < n; i++) {
    cin >> x;
    a[x]++;
  }
  for (i = 0; i < MX; i++) {
    if (a[i] >= 8) eight.insert(i);
    if (a[i] >= 6) six.insert(i);
    if (a[i] >= 4) four.insert(i);
    if (a[i] >= 2) two.insert(i);
  }
  cin >> q;
  while (q--) {
    char c;
    cin >> c >> x;
    if (c == '+') {
      a[x]++;
      if (a[x] == 8) eight.insert(x);
      if (a[x] == 6) six.insert(x);
      if (a[x] == 4) four.insert(x);
      if (a[x] == 2) two.insert(x);
    } else {
      a[x]--;
      if (a[x] == 7) eight.erase(x);
      if (a[x] == 5) six.erase(x);
      if (a[x] == 3) four.erase(x);
      if (a[x] == 1) two.erase(x);
    }
    if (eight.size() > 0 || (six.size() > 0 && two.size() > 1) ||
        (four.size() > 1) || (four.size() > 0 && two.size() > 2))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
