#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int cnt[N], totsq, totTwo;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int n, x;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x;
    cnt[x]++;
  }
  for (int i = 1; i < N; i++) {
    totsq += (cnt[i] / 4);
    if (cnt[i] % 4 > 1) totTwo++;
  }
  int q, k;
  char ch;
  cin >> q;
  while (q--) {
    cin >> ch >> k;
    if (ch == '+') {
      cnt[k]++;
      int rem = cnt[k] % 4;
      if (rem == 0) {
        totsq++;
        totTwo--;
      } else if (rem == 2)
        totTwo++;
    } else {
      cnt[k]--;
      int rem = cnt[k] % 4;
      if (rem == 3) {
        totsq--;
        totTwo++;
      } else if (rem == 1)
        totTwo--;
    }
    if (totsq >= 2 || (totsq >= 1 && totTwo >= 2))
      cout << "YES" << '\n';
    else
      cout << "NO" << '\n';
  }
  return 0;
}
