#include <bits/stdc++.h>
using namespace std;
void kehsihba() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
void solve() {
  long long n;
  cin >> n;
  long long arr[n];
  map<long long, long long> m;
  for (long long i = 0; i < n; i++) {
    cin >> arr[i];
  }
  sort(arr, arr + n);
  long long a = 0, b = 0;
  for (long long i = 0; i < n; i++) {
    m[arr[i]] += 1;
  }
  for (auto i : m) {
    if (i.second >= 4) {
      long long x = i.second / 4;
      a += x;
      long long y = i.second - x * 4;
      if (y >= 2) {
        b += 1;
      }
    } else if (i.second < 4 and i.second >= 2) {
      b += 1;
    }
  }
  long long q;
  cin >> q;
  char s;
  long long x;
  while (q--) {
    cin >> s >> x;
    bool check = false;
    if (s == '+') {
      m[x] += 1;
      if (m[x] % 4 == 0) {
        a += 1;
        b -= 1;
      } else if (m[x] % 2 == 0) {
        b += 1;
      }
    } else if (s == '-') {
      m[x] -= 1;
      if (m[x] % 4 == 3) {
        a -= 1;
        b += 1;
      } else if (m[x] % 4 == 1) {
        b -= 1;
      }
    }
    if (a >= 2) {
      check = 1;
    } else if (a == 1 and b >= 2) {
      check = 1;
    }
    cout << ((check) ? "YES\n" : "NO\n");
  }
}
int32_t main() {
  kehsihba();
  long long t = 1;
  for (long long k = 1; k <= t; k++) {
    solve();
  }
}
