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>
using namespace std;
const int maxn = 1100;
const double eps = 1e-8;
int n, m;
bool fuck;
int sign(double x) {
  if (x < -eps) return -1;
  return x > eps;
}
struct point_3d {
  double x, y, z;
  point_3d(double _x, double _y, double _z) : x(_x), y(_y), z(_z) {}
  point_3d() {}
  point_3d operator+(point_3d &a) {
    return point_3d(a.x + x, a.y + y, a.z + z);
  }
  point_3d operator-(point_3d &a) {
    return point_3d(x - a.x, y - a.y, z - a.z);
  }
  point_3d operator/(double f) { return point_3d(x / f, y / f, z / f); }
  double len() { return x * x + y * y + z * z; }
};
double dis(point_3d &a, point_3d &b) {
  return (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y) +
         (a.z - b.z) * (a.z - b.z);
}
point_3d project(double A, double B, double C, double x1, double y1,
                 double z1) {
  double lambda = (A * x1 + B * y1 + C * z1) / (A * A + B * B + C * C);
  return point_3d(x1 - lambda * A, y1 - lambda * B, z1 - lambda * C);
}
void calc2(double a, double b, double c, double d, double e, double f,
           double &x, double &y) {
  if (sign(a) == 0) swap(a, d), swap(b, e), swap(c, f);
  e += (-b / a * d);
  f += (-c / a * d);
  y = -f / e;
  x = (-b * y - c) / a;
}
point_3d cir_cen(point_3d &a, point_3d &b, point_3d &c, double A3, double B3,
                 double C3) {
  double x, y, z, A1, B1, C1, D1, A2, B2, C2, D2, D3 = 0;
  A1 = -2 * a.x + 2 * b.x;
  B1 = -2 * a.y + 2 * b.y;
  C1 = -2 * a.z + 2 * b.z;
  D1 = -(b.x * b.x + b.y * b.y + b.z * b.z - a.x * a.x - a.y * a.y - a.z * a.z);
  A2 = -2 * c.x + 2 * b.x;
  B2 = -2 * c.y + 2 * b.y;
  C2 = -2 * c.z + 2 * b.z;
  D2 = -(b.x * b.x + b.y * b.y + b.z * b.z - c.x * c.x - c.y * c.y - c.z * c.z);
  if (sign(A2) != 0) swap(A2, A1), swap(B2, B1), swap(C2, C1), swap(D2, D1);
  if (sign(A3) != 0) swap(A3, A1), swap(B3, B1), swap(C3, C1), swap(D3, D1);
  if (sign(A1) == 0) {
    fuck = true;
    return a;
  }
  B2 += (-B1 / A1 * A2);
  C2 += (-C1 / A1 * A2);
  D2 += (-D1 / A1 * A2);
  B3 += (-B1 / A1 * A3);
  C3 += (-C1 / A1 * A3);
  D3 += (-D1 / A1 * A3);
  calc2(B2, C2, D2, B3, C3, D3, y, z);
  return point_3d((-B1 * y - C1 * z - D1) / A1, y, z);
}
point_3d p[maxn], a[maxn], o;
double r;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%lf%lf%lf", &p[i].x, &p[i].y, &p[i].z);
  for (int mm = 1; mm <= m; mm++) {
    double A, B, C;
    scanf("%lf%lf%lf", &A, &B, &C);
    for (int i = 1; i <= n; i++)
      a[i] = project(A, B, C, p[i].x, p[i].y, p[i].z);
    random_shuffle(a + 1, a + n + 1);
    o = point_3d(0.00, 0.00, 0.00);
    r = 0;
    for (int i = 1; i <= n; i++)
      if (sign(dis(o, a[i]) - r) == 1) {
        o = a[i];
        r = 0;
        for (int j = 1; j <= i - 1; j++)
          if (sign(dis(o, a[j]) - r) == 1) {
            o = (a[i] + a[j]) / 2;
            r = (o - a[i]).len();
            for (int k = 1; k <= j - 1; k++)
              if (sign(dis(o, a[k]) - r) == 1) {
                o = cir_cen(a[i], a[j], a[k], A, B, C);
                r = (o - a[k]).len();
              }
          }
      }
    printf("%.9lf\n", sqrt(r));
  }
  return 0;
}