#include <bits/stdc++.h>
using namespace std;
vector<long long> graph[100005];
bool vis[100005];
long long disc[100005];
long long low[100005];
vector<long long> art_pt;
long long t = 0;
vector<pair<long long, long long> > bridge;
long long prime[1000005];
long long arr[100005];
long long power(long long a, long long b) {
  if (b == 0) return 1;
  long long x = power(a, b / 2);
  x = (x * x) % 1000000007;
  if (b % 2) return (x * (a % 1000000007)) % 1000000007;
  return x;
}
void sieve() {
  prime[0] = prime[1] = 1;
  for (long long i = 2; i * i < 1000005; i++) {
    if (prime[i] == 0) {
      for (long long j = i * i; j < 1000005; j += i) prime[j] = 1;
    }
  }
}
void dfs(long long node, long long par) {
  vis[node] = true;
  long long child = 0;
  t++;
  disc[node] = low[node] = t;
  for (auto i : graph[node]) {
    if (!vis[i]) {
      child++;
      dfs(i, node);
      low[node] = min(low[node], low[i]);
      if (par == -1 and child > 1) {
        art_pt.push_back(node);
      }
      if (par != -1 and low[i] >= disc[node]) {
        art_pt.push_back(node);
      }
      if (low[i] > disc[node]) {
        bridge.push_back({node, i});
      }
    } else {
      if (par != i) {
        low[node] = min(low[node], disc[i]);
      }
    }
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, q;
  cin >> n;
  long long a;
  for (long long i = 0; i < n; i++) {
    cin >> a;
    arr[a]++;
  }
  long long f = 0, tw = 0;
  for (long long i = 0; i < 100005; i++) {
    long long k = arr[i] / 4;
    f += k;
    k = arr[i] % 4;
    long long l = k / 2;
    tw += l;
  }
  cin >> q;
  char c;
  long long q1;
  while (q--) {
    cin >> c >> q1;
    if (c == '+') {
      arr[q1]++;
      if (arr[q1] % 4 == 0) {
        f++;
        tw--;
      } else if (arr[q1] % 2 == 0) {
        tw++;
      }
    } else {
      if (arr[q1] % 4 == 0) {
        f--;
        tw++;
      } else {
        if (arr[q1] % 2 == 0) {
          tw--;
        }
      }
      arr[q1]--;
    }
    if (f > 1) {
      cout << "YES\n";
      continue;
    }
    if (f == 0) {
      cout << "NO\n";
      continue;
    }
    if (f == 1) {
      if (tw > 1) {
        cout << "YES\n";
      } else {
        cout << "NO\n";
      }
      continue;
    }
  }
}
