#include <bits/stdc++.h>
using namespace std;
int cnt[100005];
int main() {
  int n, a, x, q;
  char ch;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a), cnt[a]++;
  int t2, t4, t6, t8;
  t2 = t4 = t6 = t8 = 0;
  for (int i = 0; i < 100005; i++) {
    if (cnt[i] >= 2) t2++;
    if (cnt[i] >= 4) t4++;
    if (cnt[i] >= 6) t6++;
    if (cnt[i] >= 8) t8++;
  }
  scanf("%d", &q);
  while (q--) {
    cin >> ch >> x;
    if (ch == '+') {
      cnt[x]++;
      if (cnt[x] == 2) t2++;
      if (cnt[x] == 4) t4++;
      if (cnt[x] == 6) t6++;
      if (cnt[x] == 8) t8++;
    } else {
      cnt[x]--;
      if (cnt[x] == 1) t2--;
      if (cnt[x] == 3) t4--;
      if (cnt[x] == 5) t6--;
      if (cnt[x] == 7) t8--;
    }
    if (t8 || (t6 && t2 >= 2) || (t4 >= 2) || (t4 && t2 >= 3))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
