#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<long long> arr(n, 0);
  for (long long i = 0; i < n; i++) cin >> arr[i];
  unordered_map<long long, long long> mp;
  for (long long i = 0; i < n; i++) mp[arr[i]]++;
  set<pair<long long, long long>> s;
  for (long long i = 0; i < n; i++) s.insert({mp[arr[i]], arr[i]});
  long long q;
  cin >> q;
  while (q--) {
    long long square = 0;
    long long rect = 0;
    char ch;
    cin >> ch;
    if (ch == '+') {
      long long num;
      cin >> num;
      s.erase({mp[num], num});
      mp[num]++;
      s.insert({mp[num], num});
      auto it = s.end();
      if (s.size() < 1) {
        cout << "NO" << endl;
        continue;
      }
      it--;
      long long val = (*it).first;
      if (val >= 8) {
        cout << "YES" << endl;
        continue;
      } else if (val >= 6) {
        rect += 1;
      } else if (val < 4) {
        cout << "NO" << endl;
        continue;
      }
      if (s.size() < 2) {
        cout << "NO" << endl;
        continue;
      }
      bool cond = false;
      it--;
      val = (*it).first;
      if (val <= 1) {
        cout << "NO" << endl;
        continue;
      } else {
        rect += val / 2;
        if (rect >= 2) {
          cout << "YES" << endl;
          continue;
        }
      }
      if (s.size() < 3) {
        cout << "NO" << endl;
        continue;
      }
      it--;
      val = (*it).first;
      if (val <= 1) {
        cout << "NO" << endl;
      } else {
        cout << "YES" << endl;
      }
    } else {
      long long num;
      cin >> num;
      s.erase({mp[num], num});
      mp[num]--;
      s.insert({mp[num], num});
      auto it = s.end();
      if (s.size() < 1) {
        cout << "NO" << endl;
        continue;
      }
      it--;
      long long val = (*it).first;
      if (val >= 8) {
        cout << "YES" << endl;
        continue;
      } else if (val >= 6) {
        rect += 1;
      } else if (val < 4) {
        cout << "NO" << endl;
        continue;
      }
      if (s.size() < 2) {
        cout << "NO" << endl;
        continue;
      }
      bool cond = false;
      it--;
      val = (*it).first;
      if (val <= 1) {
        cout << "NO" << endl;
        continue;
      } else {
        rect += val / 2;
        if (rect >= 2) {
          cout << "YES" << endl;
          continue;
        }
      }
      if (s.size() < 3) {
        cout << "NO" << endl;
        continue;
      }
      it--;
      val = (*it).first;
      if (val <= 1) {
        cout << "NO" << endl;
      } else {
        cout << "YES" << endl;
      }
    }
  }
}
