#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long T = 1;
  while (T--) {
    long long n;
    cin >> n;
    vector<long long> arr(n);
    unordered_map<long long, long long> countStore;
    set<long long> fourMore, twoMore;
    for (long long i = 0; i < n; i++) {
      cin >> arr[i];
      countStore[arr[i]]++;
    }
    for (auto it : countStore) {
      if (it.second >= 4)
        fourMore.insert(it.first);
      else if (it.second >= 2)
        twoMore.insert(it.first);
    }
    long long q;
    cin >> q;
    while (q--) {
      char operation;
      cin >> operation;
      long long val;
      cin >> val;
      if (operation == '+') {
        if (countStore[val] >= 4)
          countStore[val]++;
        else if (countStore[val] == 3) {
          twoMore.erase(val);
          fourMore.insert(val);
          countStore[val]++;
        } else if (countStore[val] == 1) {
          twoMore.insert(val);
          countStore[val]++;
        } else
          countStore[val]++;
      } else {
        if (countStore[val] > 4)
          countStore[val]--;
        else if (countStore[val] == 4) {
          fourMore.erase(val);
          twoMore.insert(val);
          countStore[val]--;
        } else if (countStore[val] == 2) {
          countStore[val]--;
          twoMore.erase(val);
        } else
          countStore[val]--;
      }
      if (fourMore.size() > 1)
        cout << "YES\n";
      else if (fourMore.size() == 1 && twoMore.size() > 0) {
        if (twoMore.size() > 1)
          cout << "YES\n";
        else {
          auto iterator = fourMore.begin();
          if (countStore[*iterator] >= 6)
            cout << "YES\n";
          else
            cout << "NO\n";
        }
      } else if (fourMore.size() == 1 && twoMore.size() == 0) {
        auto iterator = fourMore.begin();
        if (countStore[*iterator] >= 8)
          cout << "YES\n";
        else
          cout << "NO\n";
      } else
        cout << "NO\n";
    }
  }
  return 0;
}
