#include <bits/stdc++.h>
using namespace std;
int tong[200000];
int num2;
int num4;
int num6;
int num8;
void add(int x) {
  tong[x] += 1;
  if (tong[x] == 2) num2++;
  if (tong[x] == 4) num4++;
  if (tong[x] == 6) num6++;
  if (tong[x] == 8) num8++;
}
void sub(int x) {
  tong[x] -= 1;
  if (tong[x] == 1) num2--;
  if (tong[x] == 3) num4--;
  if (tong[x] == 5) num6--;
  if (tong[x] == 7) num8--;
}
bool check() {
  if (num8) return true;
  if (num6 && num2 > 1) return true;
  if (num4 > 1) return true;
  if (num4 && num2 > 2) return true;
  return false;
}
char s[10];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    add(x);
  }
  int m;
  scanf("%d", &m);
  for (int i = 1; i <= m; i++) {
    scanf("%s", s);
    int v;
    scanf("%d", &v);
    if (s[0] == '-') sub(v);
    if (s[0] == '+') add(v);
    printf(check() ? "YES\n" : "NO\n");
  }
  return 0;
}
