#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  map<int, int> mp;
  for (int i = 1; i <= 1e5; i++) mp[i] = 0;
  for (int i = 0; i < n; i++) {
    int u;
    cin >> u;
    mp[u]++;
  }
  set<pair<int, int>> s;
  for (int i = 1; i <= 1e5; i++) s.insert(make_pair(mp[i], i));
  int q;
  cin >> q;
  while (q--) {
    char c;
    cin >> c;
    int x;
    cin >> x;
    if (c == '+') {
      auto it = s.find(make_pair(mp[x], x));
      s.erase(it);
      mp[x]++;
      s.insert(make_pair(mp[x], x));
    } else {
      auto it = s.find(make_pair(mp[x], x));
      s.erase(it);
      mp[x]--;
      s.insert(make_pair(mp[x], x));
    }
    auto it = s.end();
    it--;
    int a = it->first;
    it--;
    int b = it->first;
    it--;
    int cc = it->first;
    if (a >= 4) {
      a -= 4;
    } else {
      cout << "NO"
           << "\n";
      continue;
    }
    int cnt = 0;
    if (a >= 2 && a < 4)
      cnt++;
    else if (a >= 4)
      cnt += 2;
    if (b >= 2 && b < 4)
      cnt++;
    else if (b >= 4)
      cnt += 2;
    if (cc >= 2 && cc < 4)
      cnt++;
    else if (cc >= 4)
      cnt += 2;
    if (cnt >= 2)
      cout << "YES"
           << "\n";
    else
      cout << "NO"
           << "\n";
  }
  return 0;
}
