#include <bits/stdc++.h>
using namespace std;
bool check(long long n2, long long n4, long long n6, long long n8) {
  if (n8) return true;
  if (n6 && n2 >= 2) return true;
  if (n4 >= 2) return true;
  if (n4 && n2 >= 3) return true;
  return false;
}
void solve(long long t) {
  long long n;
  cin >> n;
  vector<long long> a(n);
  unordered_map<long long, long long> m;
  long long n2 = 0, n4 = 0, n6 = 0, n8 = 0;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    m[a[i]]++;
    if (m[a[i]] == 2) n2++;
    if (m[a[i]] == 4) n4++;
    if (m[a[i]] == 6) n6++;
    if (m[a[i]] == 8) n8++;
  }
  long long q;
  cin >> q;
  for (long long i = 0; i < q; i++) {
    char ch;
    long long num;
    cin >> ch >> num;
    if (ch == '+') {
      m[num]++;
      if (m[num] == 2) n2++;
      if (m[num] == 4) n4++;
      if (m[num] == 6) n6++;
      if (m[num] == 8) n8++;
    } else {
      if (m[num] == 2) n2--;
      if (m[num] == 4) n4--;
      if (m[num] == 6) n6--;
      if (m[num] == 8) n8--;
      m[num]--;
    }
    if (check(n2, n4, n6, n8))
      cout << "YES"
           << "\n";
    else
      cout << "NO"
           << "\n";
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t = 1;
  for (long long i = 1; i <= t; i++) {
    solve(i);
  }
}
