#include <bits/stdc++.h>
using namespace std;
int main() {
  int srrg[646], erg[564], edr[6465];
  int n;
  cin >> n;
  map<int, int> mp;
  int aa = 0, bb = 0, cc = 0;
  for (int i = 0; i < n; i++) {
    int val;
    cin >> val;
    mp[val]++;
  }
  int dx, val;
  for (auto mapp : mp) {
    dx = mapp.second / 4;
    bb = bb + dx;
    if (mapp.second % 4 > 1) aa++;
  }
  int q;
  cin >> q;
  char str;
  while (q--) {
    cin >> str >> val;
    if (str == '+') {
      if (mp[val] % 4 == 3)
        bb++, aa--;
      else if (mp[val] % 2 == 1)
        aa++;
      mp[val]++;
    } else if (str == '-') {
      if (mp[val] % 4 == 0)
        aa++, bb--;
      else if (mp[val] % 2 == 0)
        aa--;
      mp[val]--;
    }
    if (bb > 0 && aa >= 2)
      cout << "YES" << endl;
    else if (bb >= 2)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
