#include <bits/stdc++.h>
using namespace std;
void Update1(vector<vector<int>> &A, int a) {
  if (A[8][a]) {
    A[8][a]++;
    return;
  }
  int j = 7;
  while (j >= 1) {
    if (A[j][a]) {
      A[j + 1][a] = A[j][a] + 1;
      A[j + 1][0]++;
      A[j][a] = 0;
      A[j][0]--;
      break;
    }
    j--;
  }
  if (j == 0) {
    A[1][a] = 1;
    A[1][0]++;
  }
}
void Update2(vector<vector<int>> &A, int a) {
  if (A[8][a] > 8) {
    A[8][a]--;
    return;
  }
  int j = 8;
  while (j > 1) {
    if (A[j][a]) {
      A[j - 1][a] = A[j][a] - 1;
      A[j - 1][0]++;
      A[j][a] = 0;
      A[j][0]--;
      break;
    }
    j--;
  }
  if (j == 1) {
    A[j][a] = 0;
    A[j][0]--;
  }
}
bool check(vector<vector<int>> &A) {
  if (A[8][0]) return 1;
  int x = A[4][0] + A[5][0] + A[6][0] + A[7][0];
  if (x > 1) return 1;
  if (x < 1) return 0;
  x = A[2][0] + A[3][0] + A[6][0] + A[7][0];
  if (x > 1) return 1;
  return 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, a, q;
  cin >> n;
  int x = pow(10, 5) + 1;
  vector<vector<int>> A(9, vector<int>(x));
  for (int i = 0; i < n; i++) {
    cin >> a;
    Update1(A, a);
  }
  string s;
  cin >> q;
  while (q--) {
    cin >> s >> a;
    if (s == "-")
      Update2(A, a);
    else
      Update1(A, a);
    if (check(A))
      cout << "YES"
           << "\n";
    else
      cout << "NO"
           << "\n";
  }
}
