#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 5, M = 4e17 + 5, OO = 0x3f3f3f3f;
long long t, n, q, x;
char ch;
long long fr[N], a[N];
set<pair<long long, long long>> st;
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> a[i];
  for (int i = 0; i < n; ++i) {
    if (fr[a[i]]) st.erase({-fr[a[i]], a[i]});
    fr[a[i]]++;
    st.insert({-fr[a[i]], a[i]});
  }
  cin >> q;
  for (int i = 0; i < q; ++i) {
    cin >> ch >> x;
    if (ch == '+') {
      if (fr[x]) st.erase({-fr[x], x});
      fr[x]++;
      st.insert({-fr[x], x});
    } else {
      st.erase({-fr[x], x});
      fr[x]--;
      if (fr[x]) st.insert({-fr[x], x});
    }
    bool ok;
    if (st.empty())
      ok = 0;
    else if (st.size() == 1) {
      auto p1 = *st.begin();
      if (abs(p1.first) >= 8)
        ok = 1;
      else
        ok = 0;
    } else if (st.size() == 2) {
      auto p1 = *st.begin();
      st.erase(st.begin());
      auto p2 = *st.begin();
      if (abs(p1.first) >= 8)
        ok = 1;
      else if (abs(p1.first) >= 4) {
        if (abs(p1.first) >= 6 && abs(p2.first) >= 2)
          ok = 1;
        else if (abs(p1.first) >= 4 && abs(p2.first) >= 4)
          ok = 1;
        else
          ok = 0;
      } else
        ok = 0;
      st.insert(p1);
    } else {
      auto p1 = *st.begin();
      st.erase(st.begin());
      auto p2 = *st.begin();
      st.erase(st.begin());
      auto p3 = *st.begin();
      if (abs(p1.first) >= 8)
        ok = 1;
      else if (abs(p1.first) >= 4) {
        if (abs(p1.first) >= 6) {
          if (abs(p2.first) >= 2)
            ok = 1;
          else
            ok = 0;
        } else if (abs(p2.first) >= 4)
          ok = 1;
        else if (abs(p2.first) >= 2 && abs(p3.first) >= 2)
          ok = 1;
        else
          ok = 0;
      } else
        ok = 0;
      st.insert(p1);
      st.insert(p2);
    }
    if (ok)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
