#include <bits/stdc++.h>
using namespace std;
int a[200005];
int nho[200005];
int main() {
  a[0] = 0;
  int chiahet4 = 0;
  int chiahet2 = 0;
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    ++nho[a[i]];
  }
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; ++i) {
    if (a[i] != a[i - 1]) {
      chiahet4 += nho[a[i]] / 4;
      chiahet2 += (nho[a[i]] % 4) / 2;
    }
  }
  int q;
  cin >> q;
  int sl = n;
  for (int d = 1; d <= q; ++d) {
    char loai;
    int x;
    cin >> loai >> x;
    if (loai == '+') {
      ++nho[x];
      if (nho[x] > 1) {
        chiahet4 -= (nho[x] - 1) / 4;
        chiahet2 -= ((nho[x] - 1) % 4) / 2;
        chiahet4 += (nho[x]) / 4;
        chiahet2 += (nho[x] % 4) / 2;
      }
      if (chiahet4 >= 2)
        cout << "YES"
             << "\n";
      else {
        if (chiahet4 == 1 && chiahet2 >= 2)
          cout << "YES"
               << "\n";
        else
          cout << "NO"
               << "\n";
      }
    }
    if (loai == '-') {
      --nho[x];
      if (nho[x] > 0) {
        chiahet4 -= (nho[x] + 1) / 4;
        chiahet2 -= ((nho[x] + 1) % 4) / 2;
        chiahet4 += (nho[x]) / 4;
        chiahet2 += (nho[x] % 4) / 2;
      }
      if (chiahet4 >= 2)
        cout << "YES"
             << "\n";
      else {
        if (chiahet4 == 1 && chiahet2 >= 2)
          cout << "YES"
               << "\n";
        else
          cout << "NO"
               << "\n";
      }
    }
  }
}
