#include <bits/stdc++.h>
using namespace std;
vector<int> b;
void build(vector<pair<int, int>> &a,
           vector<pair<int, vector<pair<int, int>>>> &t, int u, int lt,
           int rt) {
  if (lt == rt) {
    t[u].first = 1;
    t[u].second.resize(1);
    t[u].second[0] = a[lt];
    b[lt] = u;
  } else {
    int med = (lt + rt) / 2;
    build(a, t, 2 * u, lt, med);
    build(a, t, 2 * u + 1, med + 1, rt);
    t[u].first = 1;
    t[u].second.resize(rt - lt + 1);
    int i;
    for (i = 0; i < rt - lt + 1; ++i) t[u].second[i] = make_pair(1, 1);
  }
}
int main() {
  int n, q, i, j;
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> q;
  b.resize(n);
  vector<pair<int, int>> a(n, make_pair(1, 1));
  vector<pair<int, vector<pair<int, int>>>> t(4 * n);
  build(a, t, 1, 0, n - 1);
  for (j = 0; j < q; ++j) {
    int x, y, it = 0, it2;
    cin >> y >> x;
    y--;
    x--;
    it2 = y;
    if (y == 0)
      a[x].first = !a[x].first;
    else
      a[x].second = !a[x].second;
    int u = b[x];
    t[u].second[0] = a[x];
    if (t[u].second[0].first == t[u].second[0].second &&
        t[u].second[0].first == 0)
      t[u].first = 0;
    else
      t[u].first = 1;
    while (u > 1) {
      if (u % 2 == 0) {
        if (t[u].first == 0 || t[u + 1].first == 0) {
          t[u / 2].first = 0;
        } else {
          if ((t[u].second[t[u].second.size() - 1].first == 1 &&
               t[u + 1].second[0].first == 1) ||
              (t[u].second[t[u].second.size() - 1].second == 1 &&
               t[u + 1].second[0].second == 1))
            t[u / 2].first = 1;
          else
            t[u / 2].first = 0;
        }
        t[u / 2].second[it] = a[x];
        u /= 2;
      } else {
        if (t[u].first == 0 || t[u - 1].first == 0) {
          t[(u - 1) / 2].first = 0;
        } else {
          if ((t[u - 1].second[t[u - 1].second.size() - 1].first == 1 &&
               t[u].second[0].first == 1) ||
              (t[u - 1].second[t[u - 1].second.size() - 1].second == 1 &&
               t[u].second[0].second == 1))
            t[(u - 1) / 2].first = 1;
          else
            t[(u - 1) / 2].first = 0;
        }
        it += t[u - 1].second.size();
        t[(u - 1) / 2].second[it] = a[x];
        u = (u - 1) / 2;
      }
    }
    if (t[1].first == 1)
      cout << "YES"
           << "\n";
    else
      cout << "NO"
           << "\n";
  }
}
