#include <bits/stdc++.h>
using namespace std;
struct point {
  double x, y, z;
  point(double x = 0, double y = 0, double z = 0) : x(x), y(y), z(z) {}
  friend istream& operator>>(istream& in, point& p) {
    return in >> p.x >> p.y >> p.z;
  }
  friend ostream& operator<<(ostream& out, const point& p) {
    return out << "(" << p.x << "," << p.y << "," << p.z << ")";
  }
  friend double dot(const point& a, const point& b) {
    return a.x * b.x + a.y * b.y + a.z * b.z;
  }
  friend double dot(const point& a) { return dot(a, a); }
  friend double mag(const point& a) { return sqrt(dot(a)); }
  friend double dist(const point& a, const point& b) { return mag(b - a); }
  point project(const point& n) {
    point vn = n * dot(*this, n) / dot(n, n);
    return *this - vn;
  }
  friend point operator+(const point& a, const point& b) {
    return point(a.x + b.x, a.y + b.y, a.z + b.z);
  }
  friend point operator-(const point& a, const point& b) {
    return point(a.x - b.x, a.y - b.y, a.z - b.z);
  }
  friend point operator*(const point& a, double b) {
    return point(a.x * b, a.y * b, a.z * b);
  }
  friend point operator/(const point& a, double b) {
    return point(a.x / b, a.y / b, a.z / b);
  }
};
point circumcenter(const point& A, const point& B, const point& C) {
  double c2 = dot(A - B);
  double a2 = dot(B - C);
  double b2 = dot(C - A);
  double a = a2 * (b2 + c2 - a2);
  double b = b2 * (c2 + a2 - b2);
  double c = c2 * (a2 + b2 - c2);
  return (A * a + B * b + C * c) / (a + b + c);
}
int n, m;
point sphere[901], p[901], plane;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.precision(12);
  cout << fixed;
  cin >> n >> m;
  for (int i = 0; i < n; ++i) {
    cin >> sphere[i];
  }
  while (m--) {
    cin >> plane;
    for (int i = 0; i < n; ++i) {
      p[i] = sphere[i].project(plane);
    }
    random_shuffle(p, p + n);
    point center;
    double radius = 0;
    for (int i = 0; i < n; ++i) {
      if (dist(center, p[i]) > radius + 1e-7) {
        center = p[i];
        radius = 0;
        for (int j = 0; j < i; ++j) {
          if (dist(center, p[j]) > radius + 1e-7) {
            center = (p[i] + p[j]) / 2;
            radius = dist(center, p[i]);
            for (int k = 0; k < j; ++k) {
              if (dist(center, p[k]) > radius + 1e-7) {
                center = circumcenter(p[i], p[j], p[k]);
                radius = dist(center, p[i]);
              }
            }
          }
        }
      }
    }
    cout << radius << '\n';
  }
  cout << fixed;
}
