#include <bits/stdc++.h>
void solve() {
  int n;
  std::cin >> n;
  std::unordered_map<int, int> hash;
  for (int i = 0; i < n; i++) {
    int val;
    std::cin >> val;
    hash[val]++;
  }
  int sq = 0;
  int rec = 0;
  for (auto r : hash) {
    sq += r.second / 4;
    if (r.second % 4 >= 2) rec++;
  }
  int q;
  std::cin >> q;
  while (q--) {
    char ch;
    std::cin >> ch;
    int val;
    std::cin >> val;
    sq -= hash[val] / 4;
    if (hash[val] % 4 >= 2) rec--;
    if (ch == '+') {
      hash[val]++;
      sq += hash[val] / 4;
      if (hash[val] % 4 >= 2) rec++;
    } else {
      hash[val]--;
      sq += hash[val] / 4;
      if (hash[val] % 4 >= 2) rec++;
    }
    if (sq > 1)
      std::cout << "YES\n";
    else if (sq >= 1 && (rec / 2) >= 1)
      std::cout << "YES\n";
    else
      std::cout << "NO\n";
  }
}
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(0);
  std::cout.tie(0);
  solve();
}
