Problem: In the year of 3000 travelling around parallel realities became a routine thing. However one has to take into consideration that travelling like that is highly dangerous as you never know beforehand where you're gonna get...

Little Vasya, for instance, found himself in a gaming reality and now he has to successfully complete all levels of a very weird game to get back. The gaming reality is a three-dimensional space where n points are given. The game has m levels and at the beginning of the i-th level the player is positioned at some plane Qi that passes through the origin. On each level Vasya has to use special robots to construct and activate n powerful energy spheres of the equal radius with centers at the given points. The player chooses the radius of the spheres himself. The player has to spend R units of money to construct spheres whose radius equals R (consequently, one can construct spheres whose radius equals zero for free). Besides, once for each level a player can choose any point in space and release a laser ray from there, perpendicular to plane Qi (this action costs nothing). The ray can either be directed towards the plane or from the plane. The spheres that share at least one point with the ray will be immediately activated. The level is considered completed if the player has managed to activate all spheres. Note that the centers of the spheres are the same for all m levels but the spheres do not remain: the player should construct them anew on each new level.

Help Vasya find out what minimum sum of money will be enough to complete each level.

Input

The first line contains two integers n and m (1 ≤ n ≤ 900, 1 ≤ m ≤ 100) — the number of energetic spheres and the number of levels in the game correspondingly. 

Each of the following n lines contains three integers xi, yi, zi (0 ≤ xi, yi, zi ≤ 104) — the coordinates of the center of the i-th sphere. Assume that these points do not change their positions throughout the game.

Then follow m lines, each containing three integers ai, bi, ci (0 ≤ ai, bi, ci ≤ 100, ai2 + bi2 + ci2 > 0). These numbers are the coefficients in the equation of plane Qi (aix + biy + ciz = 0), where the player is positioned at the beginning of the i-th level.

Output

Print m numbers, one per line: the i-th line should contain the minimum sum of money needed to complete the i-th level. The absolute or relative error should not exceed 10 - 6.

Examples

Input

4 1
0 0 0
0 1 0
1 0 0
1 1 0
0 0 1


Output

0.7071067812


Input

5 3
0 1 0
1 0 1
1 2 1
2 0 1
1 3 0
1 1 1
1 2 3
3 0 3


Output

1.6329931619
1.6366341768
1.5411035007


Input

2 1
0 20 0
0 0 0
0 10 0


Output

0.0000000000

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
const double eps = 1e-10;
int N, M;
struct Point {
  double x, y, z;
  friend istream& operator>>(istream& in, Point& p) {
    return in >> p.x >> p.y >> p.z;
  }
  void print() { printf("(%.3lf, %.3lf, %.3lf)", x, y, z); }
  Point operator-(const Point& p) const { return {x - p.x, y - p.y, z - p.z}; }
  Point operator+(const Point& p) const { return {x + p.x, y + p.y, z + p.z}; }
  Point operator*(double s) const { return {x * s, y * s, z * s}; }
  Point operator/(double s) const { return {x / s, y / s, z / s}; }
  double norm2() { return x * x + y * y + z * z; }
  double norm() { return sqrt(norm2()); }
  Point unit() {
    double d = norm();
    return {x / d, y / d, z / d};
  }
  Point cross(const Point& p) {
    return {y * p.z - z * p.y, z * p.x - x * p.z, x * p.y - y * p.x};
  }
  double dot(const Point& p) { return x * p.x + y * p.y + z * p.z; }
};
struct Plane {
  double a, b, c, d;
  Point p0, n;
  void compute_normal() {
    Point p1, p2;
    if (abs(a) > eps) {
      p0 = {d / a, 0, 0};
      p1 = {(d - b) / a, 1, 0};
      p2 = {(d - c) / a, 0, 1};
    } else if (abs(b) > eps) {
      p0 = {0, d / b, 0};
      p1 = {1, (d - a) / b, 0};
      p2 = {0, (d - c) / b, 1};
    } else {
      assert(abs(c) > eps);
      p0 = {0, 0, d / c};
      p1 = {0, 1, (d - b) / c};
      p2 = {1, 0, (d - a) / c};
    }
    n = (p1 - p0).cross(p2 - p0).unit();
  }
  Plane(double a, double b, double c, double d) : a(a), b(b), c(c), d(d) {
    compute_normal();
  }
  Point project(const Point& p) { return p - n * n.dot(p - p0); }
};
Point bary(const Point& A, const Point& B, const Point& C, double a, double b,
           double c) {
  return (A * a + B * b + C * c) / (a + b + c);
}
Point circumcenter(const Point& A, const Point& B, const Point& C) {
  double a = (B - C).norm2(), b = (C - A).norm2(), c = (A - B).norm2();
  return bary(A, B, C, a * (b + c - a), b * (c + a - b), c * (a + b - c));
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> N >> M;
  cout << setprecision(10) << fixed;
  vector<Point> spheres(N), proj(N);
  for (int i = 0; i < N; ++i) cin >> spheres[i];
  while (M--) {
    double a, b, c;
    cin >> a >> b >> c;
    Plane plane(a, b, c, 0);
    for (int i = 0; i < N; ++i) {
      proj[i] = plane.project(spheres[i]);
    }
    random_shuffle(proj.begin(), proj.end());
    double r = 0;
    Point center = proj[0];
    for (int i = 1; i < N; ++i) {
      if ((proj[i] - center).norm() > r + eps) {
        center = proj[i];
        r = 0;
        for (int j = 0; j < i; ++j) {
          if ((proj[j] - center).norm() > r + eps) {
            center = (proj[i] + proj[j]) * 0.5;
            r = (proj[i] - center).norm();
            for (int k = 0; k < j; ++k) {
              if ((proj[k] - center).norm() > r + eps) {
                center = circumcenter(proj[i], proj[j], proj[k]);
                r = (proj[k] - center).norm();
              }
            }
          }
        }
      }
    }
    cout << r << '\n';
  }
  return 0;
}