#include <bits/stdc++.h>
using namespace std;
map<int, int> mp;
int main() {
  ios_base::sync_with_stdio(0);
  int t = 1;
  while (t--) {
    int n;
    cin >> n;
    int c2 = 0, c4 = 0;
    for (int i = 0; i < n; i++) {
      int z;
      cin >> z;
      if (mp[z] % 2 == 1) c2++;
      if (mp[z] % 4 == 3) c4++;
      mp[z]++;
    }
    int a;
    cin >> a;
    for (int i = 0; i < a; i++) {
      char c;
      cin >> c;
      int z;
      cin >> z;
      if (c == '+') {
        if (mp[z] % 2 == 1) c2++;
        if (mp[z] % 4 == 3) c4++;
        mp[z]++;
      } else {
        if (mp[z] % 2 == 0) c2--;
        if (mp[z] % 4 == 0) c4--;
        mp[z]--;
      }
      if (c2 >= 4 && c4 >= 1)
        cout << "YES"
             << "\n";
      else
        cout << "NO"
             << "\n";
    }
  }
  return 0;
}
