#include <bits/stdc++.h>
using namespace std;
int n, m, a[100011], s, p2, p4, p6, p8;
void solve() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> s;
    a[s]++;
    if (a[s] == 2) p2++;
    if (a[s] == 4) p4++;
    if (a[s] == 6) p6++;
    if (a[s] == 8) p8++;
  }
  cin >> m;
  for (int i = 1; i <= m; i++) {
    char opt;
    cin >> opt >> s;
    if (opt == '+') {
      a[s]++;
      if (a[s] == 2) p2++;
      if (a[s] == 4) p4++;
      if (a[s] == 6) p6++;
      if (a[s] == 8) p8++;
    } else {
      a[s]--;
      if (a[s] == 1) p2--;
      if (a[s] == 3) p4--;
      if (a[s] == 5) p6--;
      if (a[s] == 7) p8--;
    }
    if (p8 || (p6 && p2 >= 2) || (p4 && (p2 >= 3)) || (p4 >= 2))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
int main() {
  int T;
  T = 1;
  while (T--) solve();
  return 0;
}
