#include <bits/stdc++.h>
#pragma GCC optimize(2)
using namespace std;
const double eps = 1e-8;
const int inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const double pi = acos(-1.0);
inline int rd() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
void out(int a) {
  if (a < 0) putchar('-'), a = -a;
  if (a >= 10) out(a / 10);
  putchar(a % 10 + '0');
}
const int maxn = 1e5 + 10;
int cnt[maxn];
int cnt2 = 0, cnt4 = 0, cnt6 = 0, cnt8 = 0;
bool check() {
  if (cnt8) return true;
  if ((cnt4 >= 1 || cnt6 >= 1) && (cnt2 >= 2)) return true;
  if (cnt4 >= 2 || cnt6 >= 2) return true;
  if (cnt6 && cnt2) return true;
  if (cnt4 && cnt6) return true;
  return false;
}
int main() {
  int n = rd();
  for (int i = 1; i <= n; i++) {
    int now = rd();
    if (cnt[now] == 1)
      cnt2++;
    else if (cnt[now] == 3)
      cnt2--, cnt4++;
    else if (cnt[now] == 5)
      cnt4--, cnt6++;
    else if (cnt[now] == 7)
      cnt6--, cnt8++;
    cnt[now]++;
  }
  int q = rd();
  char op;
  int x;
  while (q--) {
    scanf(" %c%d", &op, &x);
    if (op == '+') {
      if (cnt[x] == 1)
        cnt2++;
      else if (cnt[x] == 3)
        cnt2--, cnt4++;
      else if (cnt[x] == 5)
        cnt4--, cnt6++;
      else if (cnt[x] == 7)
        cnt6--, cnt8++;
      cnt[x]++;
      int ok = check();
      puts(ok ? "YES" : "NO");
    } else {
      if (cnt[x] == 2) cnt2--;
      if (cnt[x] == 4) cnt4--, cnt2++;
      if (cnt[x] == 6) cnt6--, cnt4++;
      if (cnt[x] == 8) cnt8--, cnt6++;
      cnt[x]--;
      int ok = check();
      puts(ok ? "YES" : "NO");
    }
  }
  return 0;
}
