#include <bits/stdc++.h>
using namespace std;
struct Point {
  double x, y;
  Point(double _x, double _y) : x(_x), y(_y) {}
  Point() {}
} P[1000];
int x[1000], y[1000], z[1000];
int n, m;
Point chg(int a, int b, int c, int d, int e, int f) {
  if (a == 0 && b == 0) return Point(d, e);
  if (b == 0 && c == 0) return Point(e, f);
  if (c == 0 && a == 0) return Point(f, d);
  double t = -(a * d + b * e + c * f + 0.0) / (a * a + b * b + c * c);
  double x = d + t * a, y = e + t * b, z = f + t * c;
  double aa = sqrt(x * x + y * y + z * z), bb = sqrt(b * b + c * c),
         cc = sqrt(x * x + (c + y) * (c + y) + (z - b) * (z - b));
  if (fabs(aa) < 1e-8) return Point(0, 0);
  double ang = acos((aa * aa + bb * bb - cc * cc) / (2 * aa * bb));
  if (x < 0) ang = -ang;
  return Point(aa * cos(ang), aa * sin(ang));
}
Point GetC(double a, double b, double c, double d, double e, double f) {
  return Point((c * e - b * f) / (a * e - d * b),
               (d * c - a * f) / (b * d - a * e));
}
double Dis(const Point &A, const Point &B) {
  return sqrt((A.x - B.x) * (A.x - B.x) + (A.y - B.y) * (A.y - B.y));
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; ++i) scanf("%d%d%d", x + i, y + i, z + i);
  for (int j = 0; j < m; ++j) {
    int a, b, c;
    scanf("%d%d%d", &a, &b, &c);
    for (int i = 0; i < n; ++i) P[i] = (chg(a, b, c, x[i], y[i], z[i]));
    random_shuffle(P, P + n);
    Point C = P[0];
    double R = 0;
    for (int i = 1, j, k; i < n; ++i)
      if (Dis(P[i], C) > R + 1e-12) {
        C = P[i];
        R = 0;
        for (j = 0; j < i; ++j)
          if (Dis(P[j], C) > R + 1e-12) {
            C = Point((P[i].x + P[j].x) / 2, (P[i].y + P[j].y) / 2);
            R = Dis(P[j], C);
            for (k = 0; k < j; ++k)
              if (Dis(C, P[k]) > R + 1e-12) {
                C = GetC(P[j].x - P[i].x, P[j].y - P[i].y,
                         -(P[i].x * P[i].x + P[i].y * P[i].y - P[j].x * P[j].x -
                           P[j].y * P[j].y) /
                             2,
                         P[k].x - P[i].x, P[k].y - P[i].y,
                         -(P[i].x * P[i].x + P[i].y * P[i].y - P[k].x * P[k].x -
                           P[k].y * P[k].y) /
                             2);
                R = Dis(P[k], C);
              }
          }
      }
    printf("%.9lf\n", R);
  }
  return 0;
}
