#include <bits/stdc++.h>
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using namespace std;
const int N = 1e5 + 2;
int n, q, a[N], cnt[N], cnt4, cnt2;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n;
  for (int i = (1); i <= (n); ++i) {
    cin >> a[i];
    cnt[a[i]]++;
    if (cnt[a[i]] == 4)
      cnt2--, cnt4++;
    else if (cnt[a[i]] > 4 && cnt[a[i]] % 2 == 0)
      cnt2++;
    else if (cnt[a[i]] == 2)
      cnt2++;
  }
  cin >> q;
  while (q--) {
    char t;
    int x;
    cin >> t >> x;
    if (t == '+') {
      cnt[x]++;
      if (cnt[x] == 4)
        cnt2--, cnt4++;
      else if (cnt[x] > 4 && cnt[x] % 2 == 0)
        cnt2++;
      else if (cnt[x] == 2)
        cnt2++;
    } else {
      cnt[x]--;
      if (cnt[x] == 3)
        cnt4--, cnt2++;
      else if (cnt[x] > 4 && cnt[x] % 2 == 1)
        cnt2--;
      else if (cnt[x] == 1)
        cnt2--;
    }
    if (cnt4 >= 2 || (cnt4 == 1 && cnt2 >= 2))
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
