#include <bits/stdc++.h>
using namespace std;
int cnt[100005];
int main() {
  int n;
  cin >> n;
  int cnt2 = 0, cnt4 = 0;
  vector<int> arr(n, 0);
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
    cnt2 -= cnt[arr[i]] / 2;
    cnt4 -= cnt[arr[i]] / 4;
    cnt[arr[i]]++;
    cnt2 += cnt[arr[i]] / 2;
    cnt4 += cnt[arr[i]] / 4;
  }
  int q;
  cin >> q;
  char c;
  int num;
  while (q--) {
    cin >> c >> num;
    cnt2 -= cnt[num] / 2;
    cnt4 -= cnt[num] / 4;
    if (c == '+')
      cnt[num]++;
    else
      cnt[num]--;
    cnt2 += cnt[num] / 2;
    cnt4 += cnt[num] / 4;
    if (cnt4 >= 1 && cnt2 > 3)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
