#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t, a, b, c, d, i, j, k, l, m, n, x, y, p;
  map<long long int, long long int> dp;
  set<long long int> e;
  cin >> n;
  long long int h[n + 5];
  for (i = 0; i < n; i++) {
    cin >> h[i];
    e.insert(h[i]);
    dp[h[i]]++;
  }
  vector<long long int> s(e.begin(), e.end());
  a = 0, b = 0, c = 0, d = 0;
  for (i = 0; i < s.size(); i++) {
    if (dp[s[i]] >= 8)
      a++;
    else if (dp[s[i]] >= 6)
      b++;
    else if (dp[s[i]] >= 4)
      c++;
    else if (dp[s[i]] >= 2)
      d++;
  }
  cin >> t;
  char ch;
  while (t--) {
    cin >> ch >> p;
    if (ch == '+') {
      dp[p]++;
      if (dp[p] == 8) {
        a++;
        b--;
      } else if (dp[p] == 6) {
        b++;
        c--;
      } else if (dp[p] == 4) {
        c++;
        d--;
      } else if (dp[p] == 2)
        d++;
      if (a > 0 || b > 1 || c > 1)
        cout << "YES" << endl;
      else if (b > 0 && (c > 0 || d > 0))
        cout << "YES" << endl;
      else if (c > 0 && d > 1)
        cout << "YES" << endl;
      else
        cout << "NO" << endl;
    } else if (ch == '-') {
      dp[p]--;
      if (dp[p] == 7) {
        a--;
        b++;
      } else if (dp[p] == 5) {
        b--;
        c++;
      } else if (dp[p] == 3) {
        c--;
        d++;
      } else if (dp[p] == 1) {
        d--;
      }
      if (a > 0 || b > 1 || c > 1)
        cout << "YES" << endl;
      else if (b > 0 && (c > 0 || d > 0))
        cout << "YES" << endl;
      else if (c > 0 && d > 1)
        cout << "YES" << endl;
      else
        cout << "NO" << endl;
    }
  }
}
