#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const int INF = 0x3f3f3f3f;
const int MAXN = 1e5 + 15;
int a[MAXN];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    int tmp;
    scanf("%d", &tmp);
    a[tmp]++;
  }
  int cnt2 = 0, cnt4 = 0, cnt6 = 0, cnt8 = 0;
  for (int i = 1; i <= 100000; i++) {
    if (a[i] >= 8)
      cnt8++;
    else if (a[i] >= 6)
      cnt6++;
    else if (a[i] >= 4)
      cnt4++;
    else if (a[i] >= 2)
      cnt2++;
  }
  int q;
  scanf("%d", &q);
  while (q--) {
    char c;
    getchar();
    scanf("%c", &c);
    int tmp;
    scanf("%d", &tmp);
    if (c == '+') {
      a[tmp]++;
      if (a[tmp] == 8) {
        cnt6--;
        cnt8++;
      } else if (a[tmp] == 6) {
        cnt4--;
        cnt6++;
      } else if (a[tmp] == 4) {
        cnt2--;
        cnt4++;
      } else if (a[tmp] == 2) {
        cnt2++;
      }
    } else {
      a[tmp]--;
      if (a[tmp] == 7) {
        cnt6++;
        cnt8--;
      } else if (a[tmp] == 5) {
        cnt4++;
        cnt6--;
      } else if (a[tmp] == 3) {
        cnt2++;
        cnt4--;
      } else if (a[tmp] == 1) {
        cnt2--;
      }
    }
    if (cnt8 >= 1)
      printf("YES\n");
    else if (cnt6 >= 2 || cnt4 >= 2)
      printf("YES\n");
    else if (cnt6 == 1 && cnt4 + cnt2 >= 1)
      printf("YES\n");
    else if (cnt4 == 1 && cnt2 >= 2)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
