#include <bits/stdc++.h>
using namespace std;
char c;
long long i, x, k, t, n, q, w;
pair<int, pair<int, int>> a[1001001];
int main() {
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> x;
    a[x].second.second++;
    if (a[x].second.second == 2) {
      a[x].second.first++;
      w++;
      a[x].second.second = 0;
      if (a[x].second.first == 2) {
        a[x].first++;
        q++;
        a[x].second.first = 0;
        w -= 2;
      }
    }
  }
  cin >> t;
  while (t--) {
    cin >> c >> x;
    if (c == '+') {
      a[x].second.second++;
      if (a[x].second.second == 2) {
        w++;
        a[x].second.first++;
        a[x].second.second = 0;
        if (a[x].second.first == 2) {
          a[x].first++;
          q++;
          w -= 2;
          a[x].second.first = 0;
        }
      }
      if (q >= 2)
        cout << "YES" << endl;
      else {
        if (q == 0)
          cout << "NO" << endl;
        else {
          if (w >= 2)
            cout << "YES" << endl;
          else
            cout << "NO" << endl;
        }
      }
    } else {
      a[x].second.second--;
      if (a[x].second.second < 0) {
        w--;
        a[x].second.first--;
        a[x].second.second = 1;
        if (a[x].second.first < 0) {
          a[x].first--;
          q--;
          w += 2;
          a[x].second.first = 1;
        }
      }
      if (q >= 2)
        cout << "YES" << endl;
      else {
        if (q == 0)
          cout << "NO" << endl;
        else {
          if (w >= 2)
            cout << "YES" << endl;
          else
            cout << "NO" << endl;
        }
      }
    }
  }
}
