#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  cin >> n;
  map<long long, long long> mp;
  long long cnts = 0, cnt2 = 0;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    mp[x]++;
    if (mp[x] % 4 == 0) {
      ++cnts;
    }
    if (mp[x] % 2 == 0) {
      ++cnt2;
    }
  }
  long long q;
  cin >> q;
  long long totalcnt = n;
  for (long long i = 0; i < q; i++) {
    char qu;
    long long val;
    cin >> qu >> val;
    if (qu == '+') {
      ++totalcnt;
      mp[val]++;
      if (mp[val] % 4 == 0) {
        ++cnts;
      }
      if (mp[val] % 2 == 0) {
        ++cnt2;
      }
    } else {
      --totalcnt;
      if (mp[val] % 4 == 0) {
        --cnts;
      }
      if (mp[val] % 2 == 0) {
        --cnt2;
      }
      mp[val] -= 1;
    }
    if (totalcnt >= 8 and cnts >= 2) {
      cout << "YES" << endl;
    } else if (totalcnt >= 8 and cnts == 1 and cnt2 >= 4) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  { solve(); }
  return 0;
}
