#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  long long int i, j, k, l, m, n;
  cin >> n;
  vector<long long int> v;
  map<long long int, long long int> mp;
  for (i = 0; i < n; i++) {
    cin >> j;
    v.push_back(j);
    mp[j]++;
  }
  cin >> k;
  l = 0;
  long long int p = 0;
  j = 0;
  for (auto it : mp) {
    if (it.second >= 4) {
      j += it.second / 4;
      if (it.second % 4 >= 2) p++;
    } else {
      if (it.second >= 2) p++;
    }
  }
  long long int s;
  while (k--) {
    char c;
    cin >> c >> s;
    if (c == '+') {
      if (mp[s] % 4 == 3) {
        j++;
        p--;
      } else if (mp[s] % 4 == 1) {
        p++;
      }
      mp[s]++;
    } else {
      if (mp[s] > 0) {
        if (mp[s] % 4 == 0) {
          j--;
          p++;
        } else if (mp[s] % 4 == 2)
          p--;
        mp[s]--;
      }
    }
    if (j >= 2)
      cout << "YES" << endl;
    else if (j == 1 && p >= 2)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
