#include <bits/stdc++.h>
using namespace std;
template <typename... T>
void rd(T&... args) {
  ((cin >> args), ...);
}
template <typename... T>
void pp(T... args) {
  ((cout << args << " "), ...);
  cout << "\n";
}
void solve() {
  long long int n;
  cin >> n;
  long long int arr[100001] = {0};
  for (long long int i = 0; i < n; i++) {
    long long int x;
    cin >> x;
    arr[x]++;
  }
  long long int sq = 0, g2 = 0;
  for (long long int i = 0; i < 100001; i++) {
    g2 += arr[i] / 2;
    sq += arr[i] / 4;
  }
  long long int q;
  cin >> q;
  while (q--) {
    char c;
    long long int x;
    rd(c, x);
    if (c == '+') {
      g2 -= arr[x] / 2;
      sq -= arr[x] / 4;
      arr[x]++;
      g2 += arr[x] / 2;
      sq += arr[x] / 4;
    } else {
      g2 -= arr[x] / 2;
      sq -= arr[x] / 4;
      arr[x]--;
      g2 += arr[x] / 2;
      sq += arr[x] / 4;
    }
    if (sq && g2 >= 4)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  solve();
  return 0;
}
