#include <bits/stdc++.h>
using namespace std;
int main() {
  int t = 1;
  while (t--) {
    int n, a, q;
    cin >> n;
    unordered_map<int, int> mp;
    for (int i = 0; i < n; i++) {
      cin >> a;
      mp[a]++;
    }
    int j = 0, k = 0;
    for (auto i : mp) {
      if (i.second >= 4) {
        j += (i.second / 4);
        int f = i.second % 4;
        if (f >= 2) k++;
      } else if (i.second >= 2)
        k++;
    }
    cin >> q;
    int b, c, d, e;
    char x;
    for (int i = 0; i < q; i++) {
      cin >> x;
      cin >> a;
      b = 0;
      c = 0;
      d = 0;
      e = 0;
      if (mp[(a)] >= 4) {
        b += mp[a] / 4;
        if (mp[a] % 4 >= 2) c++;
      } else if (mp[(a)] >= 2) {
        c++;
      }
      if (x == '-')
        mp[a]--;
      else
        mp[(a)]++;
      j = j - b;
      k = k - c;
      if (mp[(a)] >= 4) {
        d += mp[(a)] / 4;
        int f = mp[a] % 4;
        if (f >= 2) e++;
      } else if (mp[(a)] >= 2)
        e++;
      j = j + d;
      k = k + e;
      if ((j >= 2) || (j >= 1 && k >= 2))
        cout << "YES" << endl;
      else
        cout << "NO" << endl;
    }
  }
  return 0;
}
