#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1e5 + 1;
const int MOD = 1e9 + 7;
const int INF = 1e9;
const long long LINF = 1e18;
void solve() {
  int n;
  cin >> n;
  vector<int> a(n);
  map<int, int> m;
  int squares = 0, pairs = 0;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    m[a[i]]++;
    if (m[a[i]] && m[a[i]] % 2 == 0) pairs++;
    if (m[a[i]] && m[a[i]] % 4 == 0) {
      squares++;
      pairs -= 2;
    }
  }
  int q;
  cin >> q;
  for (int i = 0; i < q; ++i) {
    char s;
    int x;
    cin >> s >> x;
    if (s == '+') {
      m[x]++;
      if (m[x] && m[x] % 2 == 0) pairs++;
      if (m[x] && m[x] % 4 == 0) {
        squares++;
        pairs -= 2;
      }
      if (squares >= 2 || (squares > 0 && pairs >= 2))
        cout << "YES" << endl;
      else
        cout << "NO" << endl;
    } else {
      if (m[x] % 4 == 0) {
        squares--;
        pairs++;
      } else if (m[x] % 2 == 0)
        pairs--;
      m[x]--;
      if (squares >= 2 || (squares > 0 && pairs >= 2))
        cout << "YES" << endl;
      else
        cout << "NO" << endl;
    }
  }
}
int main() { solve(); }
