#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const unsigned long long int MOD = 1e9 + 7;
const unsigned long long int INF = 1000000000;
const unsigned long long int MAX_N = 1e5 + 2;
bool check(unsigned long long int *a) {
  int rem = a[0] - 4;
  if (a[0] < 4) return false;
  if (rem >= 4) return true;
  if (rem >= 2 && (a[1] > 1 || a[2] > 1)) return true;
  if (a[1] > 3 || a[2] > 3) return true;
  if (a[1] > 1 && a[2] > 1) return true;
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  unsigned long long int n;
  cin >> n;
  vector<int> freq(MAX_N, 0);
  set<pair<unsigned long long int, unsigned long long int>,
      greater<pair<unsigned long long int, unsigned long long int>>>
      st;
  unsigned long long int num;
  for (unsigned long long int i = 0; i < n; ++i) {
    cin >> num;
    pair<unsigned long long int, unsigned long long int> pr = {freq[num], num};
    auto it = st.find(pr);
    freq[num]++;
    st.erase(pr);
    st.insert({freq[num], num});
  }
  char sign;
  unsigned long long int x, q;
  cin >> q;
  while (q--) {
    cin >> sign >> x;
    pair<unsigned long long int, unsigned long long int> pr = {freq[x], x};
    auto it = st.find(pr);
    st.erase(pr);
    if (sign == '+')
      freq[x]++;
    else
      freq[x]--;
    st.insert({freq[x], x});
    unsigned long long int num[3] = {0}, cnt = 0;
    for (auto x : st) {
      num[cnt] = x.first;
      cnt++;
      if (cnt == 3) break;
    }
    if (check(num))
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
