#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t;
  t = 1;
  while (t--) {
    int n;
    cin >> n;
    long long arr[n], c4 = 0, c2 = 0;
    long long i;
    map<long long, long long> make_pair;
    for (i = 0; i < n; i++) {
      cin >> arr[i];
      c4 -= make_pair[arr[i]] / 4;
      c2 -= make_pair[arr[i]] / 2;
      make_pair[arr[i]]++;
      c4 += make_pair[arr[i]] / 4;
      c2 += make_pair[arr[i]] / 2;
    }
    long long q;
    cin >> q;
    for (i = 0; i < q; i++) {
      char c;
      long long x;
      cin >> c >> x;
      c4 -= make_pair[x] / 4;
      c2 -= make_pair[x] / 2;
      if (c == '+') {
        make_pair[x]++;
      } else {
        make_pair[x]--;
      }
      c4 += make_pair[x] / 4;
      c2 += make_pair[x] / 2;
      if (c4 >= 1 && c2 >= 4) {
        cout << "YES" << endl;
      } else {
        cout << "NO" << endl;
      }
    }
  }
  return 0;
}
