#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int t, x, n, q, cnt2, cnt4;
char c;
map<int, int> mp;
int main() {
  cnt2 = cnt4 = 0;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &x);
    mp[x]++;
    if (mp[x] % 2 == 0) cnt2++;
    if (mp[x] % 4 == 0) cnt4++;
  }
  scanf("%d", &q);
  getchar();
  while (q--) {
    scanf("%c", &c);
    scanf("%d", &x);
    getchar();
    if (c == '+') {
      mp[x]++;
      if (mp[x] % 2 == 0) cnt2++;
      if (mp[x] % 4 == 0) cnt4++;
    } else {
      if (mp[x] % 2 == 0) cnt2--;
      if (mp[x] % 4 == 0) cnt4--;
      mp[x]--;
    }
    if (cnt4 >= 1 && cnt2 >= 4)
      puts("YES");
    else
      puts("NO");
  }
}
