#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, i, q, x, count[100001] = {0}, c2 = 0, c4 = 0, c6 = 0, c8 = 0;
  char c;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> x;
    count[x]++;
    if (count[x] == 2)
      c2++;
    else if (count[x] == 4)
      c4++, c2++;
    else if (count[x] == 6)
      c6++, c2++;
    else if (count[x] == 8)
      c8++, c4++, c2++;
  }
  cin >> q;
  while (q--) {
    cin >> c >> x;
    if (c == '+') {
      count[x]++;
      if (count[x] == 2)
        c2++;
      else if (count[x] == 4)
        c4++, c2++;
      else if (count[x] == 6)
        c6++, c2++;
      else if (count[x] == 8)
        c8++, c4++, c2++;
    } else {
      count[x]--;
      if (count[x] == 1)
        c2--;
      else if (count[x] == 3)
        c4--, c2--;
      else if (count[x] == 5)
        c6--, c2--;
      else if (count[x] == 7)
        c8--, c4--, c2--;
    }
    if (c8 || (c2 >= 4 && (c4 || c6)))
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
