#include <bits/stdc++.h>
using namespace std;
void solve() {
  map<long long int, long long int> m;
  long long int n;
  cin >> n;
  vector<long long int> v(n);
  for (long long int i = 0; i < n; i++) {
    cin >> v[i];
    m[v[i]]++;
  }
  long long int s4, s2;
  s4 = s2 = 0;
  for (auto it = m.begin(); it != m.end(); it++) {
    s4 += (it->second) / 4;
    s2 += (it->second) / 2;
  }
  long long int q;
  cin >> q;
  while (q--) {
    string s;
    long long int c;
    cin >> s;
    cin >> c;
    if (s == "+") {
      m[c]++;
      s4 = s4 - (m[c] - 1) / 4 + m[c] / 4;
      s2 = s2 - (m[c] - 1) / 2 + m[c] / 2;
    } else {
      m[c]--;
      s4 = s4 - (m[c] + 1) / 4 + m[c] / 4;
      s2 = s2 - (m[c] + 1) / 2 + m[c] / 2;
    }
    if (s4 >= 1 && s2 >= 4) {
      cout << "YES" << endl;
    } else
      cout << "NO" << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
