#include <bits/stdc++.h>
using namespace std;
bool debug = 0;
int n, m, k;
int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
string direc = "RDLU";
long long ln, lk, lm;
void etp(bool f = 0) {
  puts(f ? "YES" : "NO");
  exit(0);
}
void addmod(int &x, int y, int mod = 1000000007) {
  assert(y >= 0);
  x += y;
  if (x >= mod) x -= mod;
  assert(x >= 0 && x < mod);
}
void et() {
  puts("-1");
  exit(0);
}
long long fastPow(long long x, long long y, int mod = 1000000007) {
  long long ans = 1;
  while (y > 0) {
    if (y & 1) ans = (x * ans) % mod;
    x = x * x % mod;
    y >>= 1;
  }
  return ans;
}
struct Frac {
  long long x, y;
  int z;
  Frac() {}
  Frac(long long x, long long y, int z) : x(x), y(y), z(z) {}
  bool operator<(const Frac &o) const {
    return z || (o.z == 0 && (x * o.y < y * o.x));
  }
  friend bool operator==(const Frac &r1, const Frac &r2) {
    return r1.x * r2.y == r1.y * r2.x;
  }
};
int R;
Frac lt[500105], rt[500105], mp[500105];
int sateCnt;
struct mb {
  int t, x, y, id;
  void rd() {
    scanf("%d", &t);
    if (t == 2)
      scanf("%d", &id);
    else
      scanf("%d%d", &x, &y);
  }
} q[500105];
int li[500105], cnt;
const int MN = (1 << 21) + 5;
struct mbt {
  int M;
  Frac T[MN];
  void init(int sz) {
    for (M = 1; sz + 2 > M; M <<= 1)
      ;
    for (int(i) = 0; (i) < (int)(MN); (i)++) T[i] = {0, 0, 1};
  }
  void uptSingleMax(int l, Frac val) {
    l += M;
    T[l] = val;
    while (l > 1) {
      T[l >> 1] = max(T[l], T[l ^ 1]);
      l >>= 1;
    }
  }
  Frac qyRangeMax(int l, int r) {
    Frac ans = {0, 0, 1};
    for (l = l + M - 1, r = r + M + 1; l ^ r ^ 1; l >>= 1, r >>= 1) {
      if (~l & 1) ans = max(ans, T[l ^ 1]);
      if (r & 1) ans = max(ans, T[r ^ 1]);
    }
    return ans;
  }
} T;
bool del[500105];
priority_queue<pair<Frac, int>> Q[500105];
void add(int staId) {
  del[staId] = 0;
  int k = li[staId];
  Q[k].push({rt[staId], staId});
  T.uptSingleMax(k, Q[k].top().first);
}
void rmv(int staId) {
  del[staId] = 1;
  int k = li[staId];
  while (del[Q[k].top().second]) {
    Q[k].pop();
  }
  T.uptSingleMax(k, Q[k].top().first);
}
void fmain(int tid) {
  scanf("%d%d", &R, &n);
  for (int(i) = 1; (i) <= (int)(n); (i)++) {
    q[i].rd();
    if (q[i].t == 1) {
      int x = q[i].x, y = q[i].y;
      sateCnt++;
      lt[sateCnt] = Frac(x + R, y, 0);
      rt[sateCnt] = Frac(y, R - x, 0);
      q[i].id = sateCnt;
    }
  }
  for (int(i) = 1; (i) <= (int)(sateCnt); (i)++) {
    mp[i] = (lt[i]);
  }
  sort(mp + 1, mp + 1 + sateCnt);
  cnt = unique(mp + 1, mp + 1 + sateCnt) - mp - 1;
  for (int(i) = 1; (i) <= (int)(sateCnt); (i)++) {
    li[i] = lower_bound(mp + 1, mp + cnt + 1, lt[i]) - mp;
  }
  T.init(cnt);
  for (int(i) = 1; (i) <= (int)(cnt); (i)++) Q[i].push({Frac(0, 0, 1), 0});
  for (int(i) = 1; (i) <= (int)(n); (i)++) {
    if (q[i].t == 1) {
      add(q[i].id);
    } else if (q[i].t == 2) {
      rmv(q[i].id);
    } else {
      int x = q[i].x, y = q[i].y;
      if (lt[y] < lt[x]) swap(x, y);
      bool ok = 0;
      if (rt[x] < lt[y]) {
        puts("NO");
        continue;
      }
      int idx = li[y];
      rmv(x);
      rmv(y);
      ok = T.qyRangeMax(1, idx) < min(rt[x], rt[y]);
      add(x);
      add(y);
      puts(ok ? "YES" : "NO");
    }
  }
}
int main() {
  int t = 1;
  for (int(i) = 1; (i) <= (int)(t); (i)++) {
    fmain(i);
  }
  return 0;
}
