#include <bits/stdc++.h>
using namespace std;
int num1[100005], num2[100005], num4[100005];
int flag2 = 0, flag4 = 0;
void add(int x) {
  num1[x]++;
  if (num1[x] == 2) {
    num1[x] = 0;
    num2[x]++;
    flag2++;
  }
  if (num2[x] == 2) {
    num2[x] = 0;
    num4[x]++;
    flag2 -= 2;
    flag4++;
  }
  return;
}
void del(int x) {
  if (num1[x]) {
    num1[x]--;
    return;
  }
  if (num2[x]) {
    num1[x]++;
    num2[x]--;
    flag2--;
    return;
  }
  if (num4[x]) {
    num1[x]++;
    num2[x]++;
    num4[x]--;
    flag2++;
    flag4--;
    return;
  }
}
int main() {
  ios::sync_with_stdio(false);
  int t;
  cin >> t;
  memset(num1, 0, sizeof(num1));
  memset(num2, 0, sizeof(num2));
  memset(num4, 0, sizeof(num4));
  for (int i = 1; i <= t; i++) {
    int x;
    cin >> x;
    add(x);
  }
  int q;
  cin >> q;
  for (int i = 1; i <= q; i++) {
    char s;
    int x;
    cin >> s >> x;
    if (s == '+') {
      add(x);
    } else {
      del(x);
    }
    if (flag4 >= 2)
      cout << "YES" << endl;
    else if (flag4 == 1 && flag2 >= 2)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
