#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, q, a;
  cin >> n;
  int arr[100001] = {0};
  int s = 0, r = 0;
  for (int i = 0; i < n; i++) {
    cin >> a;
    arr[a]++;
    if (arr[a] % 4 == 0) {
      r--;
      s++;
    } else if (arr[a] % 2 == 0)
      r++;
  }
  cin >> q;
  char c;
  for (int i = 0; i < q; i++) {
    cin >> c >> a;
    if (c == '+') {
      arr[a]++;
      if (arr[a] % 4 == 0) {
        r--;
        s++;
      } else if (arr[a] % 2 == 0)
        r++;
    }
    if (c == '-') {
      if (arr[a] % 4 == 0) {
        r++;
        s--;
      } else if (arr[a] % 2 == 0)
        r--;
      arr[a]--;
    }
    if (s >= 2 || (s >= 1 && r >= 2))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
