#include <bits/stdc++.h>
using namespace std;
template<class T = int> using V = vector<T>;
template<class T = int> using VV = V< V<T> >;

using R = long double;
constexpr R pi = acos((R)-1), eps = 1e-10;

int sgn(R a) { return (a > eps) - (a < -eps); }
int sgn(R a, R b) { return sgn(a - b); }
using P = complex<R>;
istream& operator>>(istream& i, P& p) { R x, y; i >> x >> y; p = P(x, y); return i; }
ostream& operator<<(ostream& o, P p) { return o << fixed << setprecision(15) << real(p) << ' ' << imag(p); }
bool cmp(P p, P q) { return 2 * sgn(real(p), real(q)) + sgn(imag(p), imag(q)) < 0; }
bool eql(P p, P q) { return !cmp(p, q) and !cmp(q, p); }
R dot(P p, P q) { return real(conj(p) * q); }
R crs(P p, P q) { return imag(conj(p) * q); }
// -2: back, -1: cw, 0: on, 1: ccw, 2: front
int ccw(P p, P q) {
  int s = sgn(crs(p, q));
  if (s) return s;
  if (dot(p, q) < 0) return -2;
  if (dot(p, q - p) > 0) return 2;
  return 0;
}
int ccw(P o, P p, P q) { return ccw(p - o, q - o); }
struct L {
  P s, t;
  P vec() const { return t - s; }
  R abs() const { return std::abs(vec()); }
  R arg() const { return std::arg(vec()); }
};
int ccw(L s, P p) { return ccw(s.s, s.t, p); }

P proj(P p, L l) {
  P e = l.vec() / l.abs();
  return l.s + dot(p - l.s, e) * e;
}
R distPP(P p, P q) { return abs(q - p); }
R distPL(P p, L l) { return distPP(p, proj(p, l)); }
R distLS(L l, L s) {
  if (ccw(l, s.s) * ccw(l, s.t) != 1) return 0;
  return min(distPL(s.s, l), distPL(s.t, l));
}
P intxn(L l, L m) {
  assert(sgn(crs(l.vec(), m.vec())));
  return l.s + crs(m.s - l.s, m.vec()) / crs(l.vec(), m.vec()) * l.vec();
}

using G = V<P>;
// -1: in, 0: on, 1: out
int contains(const G& g, P p) {
  // assert(g.size() >= 3);
  int c = 0;
  P q = p + P(pi, 1), a = g.back();
  for (P b : g) {
    if (!ccw(a, b, p)) return 0;
    if (!sgn(distLS({p, q}, {a, b}))) {
      c += ccw(p, q, intxn({p, q}, {a, b})) >= 0;
    }
    a = b;
  }
  return c & 1 ? -1 : 1;
}

struct C { P o; R r; };

int main() {
  int n, m;
  while (cin >> n >> m, n) {
    V<C> c(n);
    for (auto&& e : c) cin >> e.o >> e.r;
    VV<> g(n);
    for (int i = 0; i < n; ++i) {
      bool be = false;
      for (C e : c) {
        if (c[i].o == e.o and c[i].r < e.r) be = true;
      }
      if (be) continue;
      for (int j = 0; j < n; ++j) if (c[i].o != c[j].o) {
        if (abs(c[j].o - c[i].o) > c[i].r + c[j].r) continue;
        g[i].push_back(j);
      }
      sort(begin(g[i]), end(g[i]), [&](int j0, int j1) { return arg(c[j0].o - c[i].o) < arg(c[j1].o - c[i].o); });
    }
    auto _ = [&](int i, int j) -> int { return i * n + j; };
    auto nxt = [&](int i, int j) -> int {
      for (int t = 0; t < (int)g[j].size(); ++t) if (c[g[j][t]].o == c[i].o and c[g[j][t]].r == c[i].r) {
        return t ? g[j][t - 1] : g[j].back();
      }
      return -1;
    };
    V<G> h;
    V<bool> used(n * n);
    for (int i = 0; i < n; ++i) for (int j : g[i]) if (!used[_(i, j)]) {
      used[_(i, j)] = true;
      G a{c[i].o, c[j].o};
      int s = i, t = j;
      while (true) {
        int k = nxt(s, t);
        a.push_back(c[k].o);
        s = t, t = k;
        used[_(s, t)] = true;
        if (k == i) break;
      }
      a.pop_back();
      h.push_back(a);
    }
    while (m--) {
      P p, q; cin >> p >> q;
      bool ok = true, all = true;
      for (C e : c) {
        if (abs(p - e.o) < e.r ^ abs(q - e.o) < e.r) ok = false;
        if (abs(p - e.o) < e.r or abs(q - e.o) < e.r) all = false;
      }
      if (!ok) {
        cout << "NO" << " \n"[!m];
        continue;
      }
      if (!all) {
        cout << "YES" << " \n"[!m];
        continue;
      }
      for (const G& e : h) {
        if (contains(e, p) != contains(e, q)) ok = false;
      }
      cout << (ok ? "YES" : "NO") << " \n"[!m];
    }
  }
}


Measured memory_bytes: 3348