#include <bits/stdc++.h>
int main() {
  std ::ios::sync_with_stdio(false);
  std ::cin.tie(nullptr);
  int n;
  std ::cin >> n;
  int mp[100000] = {};
  for (int i = 0; i < n; ++i) {
    int a;
    std ::cin >> a;
    --a;
    ++mp[a];
  }
  std ::multiset<int> s;
  for (int i = 0; i < 100000; ++i) s.insert(mp[i]);
  int q;
  std ::cin >> q;
  for (int i = 0; i < q; ++i) {
    char ch;
    int x;
    std ::cin >> ch >> x;
    --x;
    s.erase(s.find(mp[x]));
    if (ch == '-') {
      --mp[x];
    } else {
      ++mp[x];
    }
    s.insert(mp[x]);
    int xx = 0, y = 0, z = 0;
    auto it = s.rbegin();
    if (s.size()) xx = *it;
    ++it;
    if (s.size() > 1) y = *it;
    ++it;
    if (s.size() > 2) z = *it;
    if (xx >= 8 or (xx >= 6 and y >= 2) or (xx >= 4 and y >= 4) or
        (xx >= 4 and y >= 2 and z >= 2)) {
      std ::cout << "YES\n";
    } else
      std ::cout << "NO\n";
  }
  return 0;
}
