#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  map<int, int> m;
  int n, x;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> x;
    m[x] += 1;
  }
  int two = 0, four = 0;
  for (auto &i : m) {
    four += i.second / 4;
    two += i.second / 2 - (i.second / 4) * 2;
  }
  cin >> n;
  for (int i = 0; i < n; ++i) {
    char si;
    cin >> si >> x;
    if (si == '+') {
      four -= m[x] / 4;
      two = two - (m[x] / 2 - (m[x] / 4) * 2);
      m[x] += 1;
    } else {
      four -= m[x] / 4;
      two = two - (m[x] / 2 - (m[x] / 4) * 2);
      m[x] -= 1;
    }
    four += m[x] / 4;
    two += m[x] / 2 - (m[x] / 4) * 2;
    if (four >= 2 || (four == 1 && two >= 2))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
