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 double eps = 1e-12;
struct P {
  double x, y;
  P() {}
  P(double _x, double _y) : x(_x), y(_y) {}
};
int n, m, x[1000], y[1000], z[1000];
P a[1000];
P calc(int a, int b, int c, int d, int e, int f) {
  if (a == 0 && b == 0) return P(d, e);
  if (b == 0 && c == 0) return P(e, f);
  if (c == 0 && a == 0) return P(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) < eps) return P(0, 0);
  double ang = acos((aa * aa + bb * bb - cc * cc) / (2 * aa * bb));
  if (x < 0) ang = -ang;
  return P(aa * cos(ang), aa * sin(ang));
}
inline double dis(const P& a, const P& b) {
  return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
}
inline P getC(double a, double b, double c, double d, double e, double f) {
  return P((c * e - f * b) / (a * e - b * d),
           (c * d - f * a) / (b * d - e * a));
}
double chk() {
  random_shuffle(a + 1, a + n + 1);
  P o = a[1];
  double R = 0;
  for (int i = 2; i <= n; i++)
    if (dis(o, a[i]) > R + eps) {
      o = a[i];
      R = 0;
      for (int j = 1; j < i; j++)
        if (dis(o, a[j]) > R + eps) {
          o = P((a[i].x + a[j].x) / 2, (a[i].y + a[j].y) / 2);
          R = dis(o, a[j]);
          for (int k = 1; k < j; k++)
            if (dis(o, a[k]) > R + eps) {
              o = getC(a[j].x - a[i].x, a[j].y - a[i].y,
                       (a[j].x * a[j].x + a[j].y * a[j].y - a[i].x * a[i].x -
                        a[i].y * a[i].y) /
                           2,
                       a[k].x - a[i].x, a[k].y - a[i].y,
                       (a[k].x * a[k].x + a[k].y * a[k].y - a[i].x * a[i].x -
                        a[i].y * a[i].y) /
                           2);
              R = dis(o, a[k]);
            }
        }
    }
  return R;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d%d%d", x + i, y + i, z + i);
  for (int i = 1; i <= m; i++) {
    int A, B, C;
    scanf("%d%d%d", &A, &B, &C);
    for (int j = 1; j <= n; j++) a[j] = calc(A, B, C, x[j], y[j], z[j]);
    printf("%.9f\n", chk());
  }
  return 0;
}