#include <bits/stdc++.h>
using namespace std;
template <class S, class T>
ostream& operator<<(ostream& os, pair<S, T> p) {
  return os << "(" << p.first << ", " << p.second << ")";
}
template <typename T>
ostream& operator<<(ostream& os, vector<T> v) {
  os << "[";
  for (int i = 0; i < int((v).size()); i++) os << v[i] << " ";
  return os << "]";
}
long long INF = (1ll << 61);
int main(int argc, char* argv[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  vector<long long> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  vector<long long> freq(1e5 + 5, 0);
  for (int i = 0; i < n; i++) freq[v[i]]++;
  vector<long long> cnt(1e5 + 5, 0);
  for (int i = 0; i < 1e5 + 5; i++) cnt[freq[i]]++;
  int n8 = 0, n6 = 0, n4 = 0, n2 = 0;
  for (int i = 1e5 + 4; i >= 0; i--) {
    if (i >= 8) n8 += cnt[i];
    if (i >= 6) n6 += cnt[i];
    if (i >= 4) n4 += cnt[i];
    if (i >= 2) n2 += cnt[i];
  }
  int q;
  cin >> q;
  while (q--) {
    char c;
    cin >> c;
    int x;
    cin >> x;
    int y = freq[x];
    cnt[y]--;
    y += (c == '+' ? 1 : -1);
    cnt[y]++;
    if (c == '-') {
      switch (y) {
        case 7:
          n8--;
          break;
        case 5:
          n6--;
          break;
        case 3:
          n4--;
          break;
        case 1:
          n2--;
          break;
      }
    }
    if (c == '+') {
      switch (y) {
        case 8:
          n8++;
          break;
        case 6:
          n6++;
          break;
        case 4:
          n4++;
          break;
        case 2:
          n2++;
          break;
      }
    }
    freq[x] = y;
    if (n8 || (n6 && (n2 - 1)) || (n4 >= 2) || (n4 && (n2 - 1) >= 2))
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
