#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
long long power(long long base, long long exp);
bool cmp(pair<long long, long long>& a, pair<long long, long long>& b) {
  return a.second > b.second;
}
void solve() {
  long long n;
  cin >> n;
  map<long long, long long> m;
  set<long long> cnt2, cnt4;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    m[x]++;
  }
  for (long long i = 0; i < 100001; i++) {
    if (m[i] >= 4) {
      cnt4.insert(i);
    } else if (m[i] >= 2) {
      cnt2.insert(i);
    }
  }
  long long q;
  cin >> q;
  while (q--) {
    char x;
    cin >> x;
    long long t;
    cin >> t;
    if (x == '+') {
      m[t]++;
      if (cnt2.count(t)) {
        if (m[t] >= 4) {
          cnt2.erase(t);
          cnt4.insert(t);
        }
      } else if (!cnt4.count(t)) {
        if (m[t] >= 4) {
          cnt4.insert(t);
        } else if (m[t] >= 2) {
          cnt2.insert(t);
        }
      }
    } else {
      m[t]--;
      if (cnt4.count(t)) {
        if (m[t] < 4) {
          cnt4.erase(t);
          cnt2.insert(t);
        }
      } else if (cnt2.count(t)) {
        if (m[t] < 2) {
          cnt2.erase(t);
        }
      }
    }
    if (cnt4.size() == 0) {
      cout << "NO"
           << "\n";
      continue;
    }
    if (cnt4.size() > 1) {
      cout << "YES"
           << "\n";
      continue;
    }
    if (cnt4.size() == 1) {
      auto x = cnt4.begin();
      if (m[*x] >= 8 || cnt2.size() > 1) {
        cout << "YES"
             << "\n";
      } else {
        if (cnt2.size() == 1 && m[*x] >= 6)
          cout << "YES"
               << "\n";
        else
          cout << "NO"
               << "\n";
      }
    }
  }
}
int32_t main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  srand(chrono::high_resolution_clock::now().time_since_epoch().count());
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
long long power(long long base, long long exp) {
  base %= 1000000007;
  long long result = 1;
  while (exp > 0) {
    if (exp & 1) result = ((long long)result * base) % 1000000007;
    base = ((long long)base * base) % 1000000007;
    exp >>= 1;
  }
  return result;
}
