#include <bits/stdc++.h>
using namespace std;
int const N = 1e5 + 10;
int n, a[N], x, y, m;
int main() {
  cin >> n;
  for (int i = 1, t; i <= n; ++i) {
    scanf("%d", &t);
    a[t]++;
  }
  for (int i = 1; i <= N - 10; ++i) {
    x += a[i] / 4;
    y += a[i] % 4 / 2;
  }
  char op[2];
  cin >> m;
  for (int i = 1, t; i <= m; ++i) {
    scanf("%s", op);
    scanf("%d", &t);
    if (op[0] == '+') {
      ++a[t];
      if (a[t] % 4 == 0)
        x++, --y;
      else if (a[t] % 4 == 2)
        ++y;
    } else {
      --a[t];
      if (a[t] % 4 == 1)
        --y;
      else if (a[t] % 4 == 3)
        --x, ++y;
    }
    if (x && (x > 1 || y >= 2))
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
