#include <bits/stdc++.h>
using namespace std;
long long MOD = 1000000007;
bool isPrime(long long n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
long long power(long long x, unsigned long long y) {
  if (y == 0)
    return 1;
  else if (y % 2 == 0)
    return power(x, y / 2) * power(x, y / 2);
  else
    return x * power(x, y / 2) * power(x, y / 2);
}
vector<long long> decToBinary(long long n) {
  vector<long long> v;
  for (long long i = 31; i >= 0; i--) {
    long long k = n >> i;
    if (k & 1)
      v.push_back(1);
    else
      v.push_back(0);
  }
  return v;
}
long long euclid(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return euclid(b, a % b);
}
long long binarySearch(long long arr[], long long l, long long r, long long x) {
  if (r >= l) {
    long long mid = l + (r - l) / 2;
    if (arr[mid] == x) return mid;
    if (arr[mid] > x) return binarySearch(arr, l, mid - 1, x);
    return binarySearch(arr, mid + 1, r, x);
  }
  return -1;
}
long long maxResult(long long n, long long a, long long b, long long c) {
  long long maxVal = 0;
  for (long long i = 0; i <= n; i += a)
    for (long long j = 0; j <= n - i; j += b) {
      float z = (float)(n - (i + j)) / c;
      if (floor(z) == ceil(z)) {
        long long x = i / a;
        long long y = j / b;
        maxVal = max(maxVal, x + y + (long long)z);
      }
    }
  return maxVal;
}
long long const MAX = 100005;
long long cons[MAX];
int32_t main() {
  long long n;
  cin >> n;
  char type;
  long long x;
  long long a[n];
  long long count_2 = 0;
  long long count_4 = 0;
  for (long long i = 0; i < n; i++) {
    cin >> x;
    count_2 -= cons[x] / 2;
    count_4 -= cons[x] / 4;
    cons[x]++;
    count_2 += cons[x] / 2;
    count_4 += cons[x] / 4;
  }
  long long q;
  cin >> q;
  for (long long i = 0; i < q; i++) {
    cin >> type >> x;
    count_2 -= cons[x] / 2;
    count_4 -= cons[x] / 4;
    if (type == '+')
      cons[x]++;
    else
      cons[x]--;
    count_2 += cons[x] / 2;
    count_4 += cons[x] / 4;
    if (count_4 >= 1 && count_2 >= 4) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
}
