#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long s = 0, w = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') s = s * 10 + ch - '0', ch = getchar();
  return s * w;
}
const int manx = 2e5 + 5;
const int N = 5e2 + 5;
const int mod = 1e9 + 7;
map<long long, long long> cnt;
long long a2 = 0, a4 = 0, a6 = 0, a8 = 0;
int main() {
  std::ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  long long n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    long long x;
    cin >> x;
    cnt[x]++;
    if (cnt[x] == 2) a2++;
    if (cnt[x] == 4) a4++, a2--;
    if (cnt[x] == 6) a6++, a4--;
    if (cnt[x] == 8) a8++, a6--;
  }
  long long q;
  cin >> q;
  while (q--) {
    char c;
    long long x;
    cin >> c >> x;
    if (c == '+') {
      cnt[x]++;
      if (cnt[x] == 2) a2++;
      if (cnt[x] == 4) a4++, a2--;
      if (cnt[x] == 6) a6++, a4--;
      if (cnt[x] == 8) a8++, a6--;
    } else {
      if (cnt[x] == 2) a2--;
      if (cnt[x] == 4) a4--, a2++;
      if (cnt[x] == 6) a6--, a4++;
      if (cnt[x] == 8) a8--, a6++;
      cnt[x]--;
    }
    if (a8 >= 1 || a6 >= 2 || a4 >= 2)
      cout << "YES" << endl;
    else if (a6 == 1 && a4 == 1)
      cout << "YES" << endl;
    else if (a4 == 1 && a2 >= 2)
      cout << "YES" << endl;
    else if (a6 == 1 && a2 >= 1)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
