#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 4;
int cnt2 = 0, cnt4 = 0;
int cnt[N];
void add(int x) {
  cnt[x]++;
  if (cnt[x] % 2 == 0) cnt2++;
  if (cnt[x] % 4 == 0) cnt4++;
}
void del(int x) {
  if (cnt[x] % 2 == 0) cnt2--;
  if (cnt[x] % 4 == 0) cnt4--;
  cnt[x]--;
}
void solve() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int &x : a) cin >> x, add(x);
  int q;
  cin >> q;
  while (q--) {
    char c;
    int x;
    cin >> c >> x;
    if (c == '-') {
      del(x);
    } else {
      add(x);
    }
    if (cnt4 > 1) {
      cout << "YES\n";
    } else if (cnt4 == 1) {
      if (cnt2 - 2 >= 2)
        cout << "YES\n";
      else
        cout << "NO\n";
    } else {
      cout << "NO\n";
    }
  }
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
}
