#include <bits/stdc++.h>
using namespace std;
int main() {
  int t = 1;
  while (t--) {
    long long n, i;
    cin >> n;
    long long x, y;
    unordered_map<long long, long long> mp;
    unordered_set<long long> two, four;
    for (i = 0; i < n; i++) {
      cin >> x;
      mp[x]++;
      if (mp[x] == 4) {
        two.erase(x);
        four.insert(x);
      } else if (mp[x] == 2) {
        two.insert(x);
      }
    }
    long long q;
    cin >> q;
    char c;
    while (q--) {
      cin >> c >> x;
      if (c == '+') {
        mp[x]++;
        if (mp[x] == 4) {
          two.erase(x);
          four.insert(x);
        } else if (mp[x] == 2) {
          two.insert(x);
        }
      } else {
        mp[x]--;
        if (mp[x] == 3) {
          four.erase(x);
          two.insert(x);
        } else if (mp[x] == 1) {
          two.erase(x);
        }
      }
      if (four.size() == 0) {
        cout << "No" << endl;
        continue;
      }
      if (four.size() >= 2) {
        cout << "YES" << endl;
        continue;
      }
      if (four.size() == 1 && two.size() >= 2) {
        cout << "YES" << endl;
        continue;
      }
      if (mp[*four.begin()] >= 6 && two.size() >= 1) {
        cout << "YES" << endl;
        continue;
      }
      if (mp[*four.begin()] >= 8) {
        cout << "YES" << endl;
        continue;
      }
      cout << "NO" << endl;
    }
  }
  return 0;
}
