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;
template <class A, class B>
A convert(B x) {
  stringstream ss;
  ss << x;
  A ret;
  ss >> ret;
  return ret;
}
const int oo = ~0u >> 2;
const double eps = 1e-10;
const int mn = 1000, mo = 100000007;
const int fx[8][2] = {{-1, 0},  {1, 0},  {0, -1}, {0, 1},
                      {-1, -1}, {-1, 1}, {1, -1}, {1, 1}};
struct po {
  double x, y, z;
  po() {}
  po(double X, double Y) { x = X, y = Y, z = 0; }
  po(double X, double Y, double Z) { x = X, y = Y, z = Z; }
  po operator/(double a) { return po(x / a, y / a, z / a); }
  po operator+(po p) { return po(x + p.x, y + p.y, z + p.z); }
  po operator-(po p) { return po(x - p.x, y - p.y, z - p.z); }
} a[mn], p[mn];
int n, m;
int sgn(double x) {
  if (fabs(x) <= eps) return 0;
  if (x > -eps) return 1;
  return -1;
}
double dis(po a, po b) {
  return sqrt(((double)(a.x - b.x) * (a.x - b.x)) +
              ((double)(a.y - b.y) * (a.y - b.y)) +
              ((double)(a.z - b.z) * (a.z - b.z)));
}
po Project(po p, int A, int B, int C) {
  if (!A && !B) return po(p.x, p.y);
  if (!B && !C) return po(p.y, p.z);
  if (!A && !C) return po(p.z, p.x);
  double alpha =
      (double)(A * p.x + B * p.y + C * p.z) /
      (((double)(A) * (A)) + ((double)(B) * (B)) + ((double)(C) * (C)));
  po pA = po(p.x - alpha * A, p.y - alpha * B, p.z - alpha * C);
  po pO = po(0, 0), pB = po(0, -C, B);
  double a = dis(pO, pA), b = dis(pO, pB), c = dis(pA, pB);
  if (!sgn(a)) return po(0, 0);
  double t = (((double)(a) * (a)) + ((double)(b) * (b)) - ((double)(c) * (c))) /
             (2 * a * b),
         Ang;
  if (!sgn(t - 1))
    Ang = acos(1);
  else if (!sgn(t + 1))
    Ang = acos(-1);
  else
    Ang = acos(t);
  if (sgn(pA.x) < 0) Ang *= -1;
  return po(a * cos(Ang), a * sin(Ang));
}
po calc(po A, po B, po C) {
  double a, b, c, d, e, f;
  a = B.x - A.x, b = B.y - A.y,
  c = (((double)(B.x) * (B.x)) + ((double)(B.y) * (B.y)) -
       ((double)(A.x) * (A.x)) - ((double)(A.y) * (A.y))) /
      2.0;
  d = C.x - A.x, e = C.y - A.y,
  f = (((double)(C.x) * (C.x)) + ((double)(C.y) * (C.y)) -
       ((double)(A.x) * (A.x)) - ((double)(A.y) * (A.y))) /
      2.0;
  return po((c * e - f * b) / (a * e - b * d),
            (c * d - f * a) / (b * d - e * a));
}
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; ++i) cin >> a[i].x >> a[i].y >> a[i].z;
  random_shuffle(a + 1, a + n + 1);
  while (m--) {
    int A, B, C;
    cin >> A >> B >> C;
    for (int i = 1; i <= n; ++i) p[i] = Project(a[i], A, B, C);
    po o = po(0, 0, 0);
    double R = 0;
    for (int i = 1; i <= n; ++i)
      if (sgn(dis(o, p[i]) - R) > 0) {
        o = p[i], R = 0;
        for (int j = 1; j <= i - 1; ++j)
          if (sgn(dis(o, p[j]) - R) > 0) {
            o = (p[i] + p[j]) / 2, R = dis(o, p[i]);
            for (int k = 1; k <= j - 1; ++k)
              if (sgn(dis(o, p[k]) - R) > 0)
                o = calc(p[i], p[j], p[k]), R = dis(o, p[i]);
          }
      }
    printf("%.10f\n", R);
  }
}