#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, p, q, i, j, k;
  cin >> n;
  int a[n];
  map<int, int> m0, m2, m4, m6, m8;
  for (i = 0; i < n; i++) {
    cin >> k;
    m0[k]++;
    if (m0[k] == 2)
      m2[k] = m0[k];
    else if (m0[k] == 4) {
      m2.erase(k);
      m4[k] = m0[k];
    } else if (m0[k] == 6) {
      m4.erase(k);
      m6[k] = m0[k];
    } else if (m0[k] == 8) {
      m6.erase(k);
      m8[k] = m0[k];
    }
  }
  cin >> q;
  char c;
  for (i = 0; i < q; i++) {
    cin >> c >> k;
    if (c == '+') {
      m0[k]++;
      if (m0[k] == 2)
        m2[k] = m0[k];
      else if (m0[k] == 4) {
        m2.erase(k);
        m4[k] = m0[k];
      } else if (m0[k] == 6) {
        m4.erase(k);
        m6[k] = m0[k];
      } else if (m0[k] == 8) {
        m6.erase(k);
        m8[k] = m0[k];
      }
    } else {
      k = abs(k);
      m0[k]--;
      if (m0[k] < 2) {
        m2.erase(k);
      } else if (m0[k] < 4) {
        m2[k] = m0[k];
        m4.erase(k);
      } else if (m0[k] < 6) {
        m4[k] = m0[k];
        m6.erase(k);
      } else if (m0[k] < 8) {
        m6[k] = m0[k];
        m8.erase(k);
      }
    }
    if (m8.size() >= 1)
      cout << "YES" << '\n';
    else if (m6.size() == 1 && m2.size() >= 1)
      cout << "YES" << '\n';
    else if (m6.size() + m4.size() >= 2)
      cout << "YES" << '\n';
    else if (m4.size() == 1 && m2.size() >= 2)
      cout << "YES" << '\n';
    else
      cout << "NO" << '\n';
  }
  return 0;
}
