#include <bits/stdc++.h>
using namespace std;
int const MAXN = 100005;
long long arr[MAXN] = {0};
void fast() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
int main() {
  fast();
  long long n, t, q, x, cnt2 = 0, cnt4 = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x;
    cnt2 -= arr[x] / 2;
    cnt4 -= arr[x] / 4;
    arr[x]++;
    cnt2 += arr[x] / 2;
    cnt4 += arr[x] / 4;
  }
  cin >> q;
  char type;
  for (int i = 0; i < q; i++) {
    cin >> type >> x;
    cnt2 -= arr[x] / 2;
    cnt4 -= arr[x] / 4;
    if (type == '+')
      arr[x]++;
    else
      arr[x]--;
    cnt2 += arr[x] / 2;
    cnt4 += arr[x] / 4;
    if (cnt2 >= 4 && cnt4 >= 1)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
