#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int arr[n];
  map<int, int> mp;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    mp[arr[i]]++;
  }
  int f[9];
  memset(f, 0, sizeof(f));
  for (auto i : mp) {
    if (i.second >= 8)
      f[8]++;
    else
      f[i.second]++;
  }
  int q;
  cin >> q;
  while (q--) {
    char ch;
    int x;
    cin >> ch >> x;
    if (ch == '+') {
      if (mp[x] >= 8) {
        mp[x]++;
      } else {
        f[mp[x]]--;
        mp[x]++;
        f[mp[x]]++;
      }
    } else {
      if (mp[x] > 8) {
        mp[x]--;
      } else {
        f[mp[x]]--;
        mp[x]--;
        f[mp[x]]++;
      }
    }
    int flag = 0;
    if (f[8] > 0) {
      flag = 1;
    } else if (f[6] + f[7] > 0 && f[5] + f[4] + f[3] + f[2] > 0) {
      flag = 1;
    } else if (f[6] + f[7] > 1) {
      flag = 1;
    } else if (f[5] + f[4] > 0 && f[3] + f[2] > 1) {
      flag = 1;
    } else if (f[5] + f[4] > 1) {
      flag = 1;
    }
    if (flag)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
