#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  map<long long, long long> f;
  set<pair<long long, long long>> s;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    long long freq = f[x];
    if (freq != 0) {
      auto it = s.lower_bound({-freq, x});
      if (it != s.end()) s.erase(it);
    }
    f[x]++;
    s.insert({-f[x], x});
  }
  long long q;
  cin >> q;
  while (q--) {
    char ch;
    cin >> ch;
    long long x;
    cin >> x;
    if (ch == '+') {
      f[x]++;
      long long pf = f[x] - 1;
      auto it = s.lower_bound({-pf, x});
      if (it != s.end()) s.erase(it);
      s.insert({-f[x], x});
    } else {
      f[x]--;
      long long pf = f[x] + 1;
      auto it = s.lower_bound({-pf, x});
      if (it != s.end()) s.erase(it);
      if (f[x] != 0) s.insert({-f[x], x});
    }
    if (s.empty()) {
      cout << "NO\n";
      continue;
    }
    auto it = s.begin();
    if (-it->first < 4) {
      cout << "NO\n";
    } else {
      long long prev = -(it->first) - 4;
      if (prev >= 4) {
        cout << "YES\n";
        continue;
      }
      it++;
      if (it == s.end()) {
        cout << "NO\n";
        continue;
      }
      long long cnt2 = -it->first;
      if (cnt2 >= 4) {
        cout << "YES\n";
        continue;
      }
      if (cnt2 < 2) {
        cout << "NO\n";
      } else if (prev >= 2) {
        cout << "YES\n";
      } else {
        it++;
        if (it == s.end()) {
          cout << "NO\n";
        } else {
          long long cnt3 = -it->first;
          if (cnt3 >= 4) {
            cout << "YES\n";
            continue;
          }
          if (cnt3 >= 2)
            cout << "YES\n";
          else
            cout << "NO\n";
        }
      }
    }
  }
  return 0;
}
