#include <bits/stdc++.h>
using namespace std;
int movei[] = {0, 0, 1, -1, 1, 1, -1, -1};
int movej[] = {1, -1, 0, 0, 1, -1, 1, -1};
const double PI = acos(-1.0);
const int MXN = 1e5 + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int n;
  cin >> n;
  vector<int> frq(1e5 + 1, 0);
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    frq[x]++;
  }
  long long cnt2 = 0, cnt4 = 0;
  for (int i = 0; i < 1e5 + 1; i++) {
    cnt2 += frq[i] / 2;
    cnt4 += frq[i] / 4;
  }
  int q;
  cin >> q;
  while (q--) {
    char c;
    int x;
    cin >> c >> x;
    cnt2 -= frq[x] / 2;
    cnt4 -= frq[x] / 4;
    frq[x] += (c == '+' ? 1 : -1);
    cnt2 += frq[x] / 2;
    cnt4 += frq[x] / 4;
    if (cnt4 >= 1 && cnt2 - 2 >= 2)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
