#include <bits/stdc++.h>
using namespace std;
int n, q, g[100005], four, two;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int v;
    cin >> v;
    four -= (g[v] / 4);
    two -= (g[v] / 2);
    g[v]++;
    four += (g[v] / 4);
    two += (g[v] / 2);
  }
  cin >> q;
  for (int i = 1; i <= q; i++) {
    int v;
    char c;
    cin >> c >> v;
    if (c == '+') {
      four -= (g[v] / 4);
      two -= (g[v] / 2);
      g[v]++;
      four += (g[v] / 4);
      two += (g[v] / 2);
    } else if (c == '-') {
      four -= (g[v] / 4);
      two -= (g[v] / 2);
      g[v]--;
      four += (g[v] / 4);
      two += (g[v] / 2);
    }
    if ((four >= 1 && two >= 4) || four >= 2)
      cout << "yes" << endl;
    else
      cout << "no" << endl;
  }
}
