#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(0);
  long long n, m, a, i, b, j, k, t, x, y, z, tc, u, v, w;
  cin >> n;
  long long arr[100005] = {0}, freq[100005] = {0};
  for (i = 0; i < n; i++) {
    cin >> u;
    arr[u]++;
    freq[arr[u]]++;
  }
  cin >> m;
  while (m--) {
    char ch;
    cin >> ch >> a;
    if (ch == '+') {
      arr[a]++;
      freq[arr[a]]++;
      if (freq[8] > 0 || freq[4] > 1 || (freq[6] > 0 && freq[2] > 1) ||
          (freq[4] > 0 && freq[2] > 2))
        cout << "YES" << endl;
      else
        cout << "NO" << endl;
    } else {
      freq[arr[a]]--;
      arr[a]--;
      if (freq[8] > 0 || freq[4] > 1 || (freq[6] > 0 && freq[2] > 1) ||
          (freq[4] > 0 && freq[2] > 2))
        cout << "YES" << endl;
      else
        cout << "NO" << endl;
    }
  }
}
