#include <bits/stdc++.h>
using namespace std;
int cnt[100010];
int main() {
  cin.tie(0), cout.tie(0);
  int n, q, x;
  cin >> n;
  map<int, int> m;
  for (int i = 0; i < n; i++) {
    cin >> x;
    m[x]++;
  }
  for (auto it : m) {
    int y = it.second;
    for (int i = 2; i <= 8; i += 2) {
      if (y >= i) cnt[i]++;
    }
  }
  char s[2];
  cin >> q;
  while (q--) {
    cin >> s;
    cin >> x;
    for (int i = 2; i <= 8; i += 2) {
      if (m[x] >= i) cnt[i]--;
    }
    if (s[0] == '+')
      m[x]++;
    else
      m[x]--;
    for (int i = 2; i <= 8; i += 2) {
      if (m[x] >= i) cnt[i]++;
    }
    if (cnt[8] >= 1 || cnt[6] >= 1 && cnt[2] >= 2 ||
        cnt[4] >= 1 && cnt[2] >= 3 || cnt[4] >= 2) {
      puts("YES");
    } else
      puts("NO");
  }
  return 0;
}
