#include <bits/stdc++.h>
using namespace std;
int main() {
  map<int, int> m;
  set<int> s1, s2, s3, s4;
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    m[x]++;
    if (m[x] == 8) {
      s1.insert(x);
    }
    if (m[x] == 6) {
      s4.insert(x);
    }
    if (m[x] == 4) {
      s2.insert(x);
    }
    if (m[x] == 2) {
      s3.insert(x);
    }
  }
  int q;
  cin >> q;
  for (int i = 0; i < q; i++) {
    char c;
    cin >> c;
    int x;
    cin >> x;
    if (c == '+') {
      m[x]++;
      if (m[x] == 8) {
        s1.insert(x);
      }
      if (m[x] == 6) {
        s4.insert(x);
      }
      if (m[x] == 4) {
        s2.insert(x);
      }
      if (m[x] == 2) {
        s3.insert(x);
      }
    }
    if (c == '-') {
      if (m[x] == 8) {
        s1.erase(s1.find(x));
      }
      if (m[x] == 6) {
        s4.erase(s4.find(x));
      }
      if (m[x] == 4) {
        s2.erase(s2.find(x));
      }
      if (m[x] == 2) {
        s3.erase(s3.find(x));
      }
      m[x]--;
    }
    if (s1.size() >= 1) {
      cout << "YES" << endl;
    } else if (s2.size() >= 1 && s3.size() >= 3) {
      cout << "YES" << endl;
    } else if (s4.size() >= 1 && s3.size() >= 2) {
      cout << "YES" << endl;
    } else if (s2.size() >= 2 || s1.size() >= 2) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
