#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  int cnt2 = 0;
  int cnt4 = 0;
  int cnt6 = 0;
  int cnt8 = 0;
  map<int, int> arr;
  for (int i = 0; i < n; i++) {
    int temp;
    cin >> temp;
    auto it = arr.find(temp);
    if (it == arr.end())
      arr[temp] = 1;
    else {
      if (it->second == 1)
        cnt2++;
      else if (it->second == 3)
        cnt4++;
      else if (it->second == 5)
        cnt6++;
      else if (it->second == 7)
        cnt8++;
      it->second += 1;
    }
  }
  int q;
  cin >> q;
  while (q--) {
    char c;
    int x;
    cin >> c >> x;
    auto it = arr.find(x);
    if (c == '+') {
      if (it == arr.end())
        arr[x] = 1;
      else {
        if (it->second == 1)
          cnt2++;
        else if (it->second == 3)
          cnt4++;
        else if (it->second == 5)
          cnt6++;
        else if (it->second == 7)
          cnt8++;
        it->second += 1;
      }
    } else {
      if (it->second == 2)
        cnt2--;
      else if (it->second == 4)
        cnt4--;
      else if (it->second == 6)
        cnt6--;
      else if (it->second == 8)
        cnt8--;
      it->second -= 1;
    }
    bool flag = (cnt8 >= 1) || (cnt6 >= 1 && cnt2 >= 2) || (cnt4 >= 2) ||
                (cnt4 >= 1 && cnt2 >= 3);
    if (flag)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
