#include <bits/stdc++.h>
using namespace std;
unordered_map<int, int> mp;
int main() {
  int n;
  scanf("%d", &n);
  int sum = 0, s = 0;
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    mp[x]++;
    if (mp[x] % 2 == 0) sum++;
    if (mp[x] % 4 == 0) s++;
  }
  int m;
  scanf("%d", &m);
  char c;
  while (m--) {
    int x;
    scanf(" %c%d", &c, &x);
    if (c == '+') {
      mp[x]++;
      if (mp[x] % 2 == 0) sum++;
      if (mp[x] % 4 == 0) s++;
    } else {
      mp[x]--;
      if (mp[x] && mp[x] % 2 != 0) sum--;
      if (mp[x] && (mp[x] + 1) % 4 == 0) s--;
    }
    if (s >= 2 || (s >= 1 && sum - 2 >= 2))
      puts("YES");
    else
      puts("NO");
  }
  return 0;
}
