#include <bits/stdc++.h>
static long long int INF = 1e9 + 7;
using namespace std;
template <typename T>
bool comp(T a, T b) {
  if (a < b) return true;
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  int n;
  cin >> n;
  vector<int> v(1000001, 0);
  int two = 0, four = 0;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    two -= v[a] / 2;
    four -= v[a] / 4;
    v[a]++;
    two += v[a] / 2;
    four += v[a] / 4;
  }
  int q;
  cin >> q;
  while (q--) {
    int ch = false, ch1 = false;
    char c;
    int a;
    cin >> c >> a;
    two -= v[a] / 2;
    four -= v[a] / 4;
    if (c == '+')
      v[a]++;
    else
      v[a]--;
    two += v[a] / 2;
    four += v[a] / 4;
    if (four >= 1 && two >= 4)
      cout << "yEs";
    else
      cout << "nO";
    cout << "\n";
  }
}
