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;
struct point {
  double x, y, z;
};
const double eps = 1e-8;
point p[1000];
int x[1000], y[1000], z[1000];
int a, b, c;
int n, m;
bool flag, note = false;
void add(int i, int a, int b, int c, int x, int y, int z) {
  double t = double(a * x + b * y + c * z) / double(a * a + b * b + c * c);
  p[i].x = double(x) - t * a;
  p[i].y = double(y) - t * b;
  p[i].z = double(z) - t * c;
}
point equa(const double &a0, const double &b0, const double &c0, const point &A,
           const point &B, const point &C) {
  long double x[3][4], y[3];
  x[0][0] = a0;
  x[0][1] = b0;
  x[0][2] = c0;
  x[0][3] = 0;
  x[1][0] = 2 * (A.x - B.x);
  x[1][1] = 2 * (A.y - B.y);
  x[1][2] = 2 * (A.z - B.z);
  x[1][3] =
      A.x * A.x - B.x * B.x + A.y * A.y - B.y * B.y + A.z * A.z - B.z * B.z;
  x[2][0] = 2 * (A.x - C.x);
  x[2][1] = 2 * (A.y - C.y);
  x[2][2] = 2 * (A.z - C.z);
  x[2][3] =
      A.x * A.x - C.x * C.x + A.y * A.y - C.y * C.y + A.z * A.z - C.z * C.z;
  int i, j, k;
  for (i = 0; i < (3); i++) {
    k = -1;
    for (j = i; j < 3; j++)
      if (abs(x[j][i]) > eps) k = j;
    if (k == -1) {
      flag = false;
      return A;
    }
    for (j = 0; j < (4); j++) swap(x[i][j], x[k][j]);
    for (j = i + 1; j < 4; j++) {
      double t = x[j][i] / x[i][i];
      for (k = i + 1; k < 4; k++)
        x[j][k] = x[j][k] - x[i][k] * x[j][i] / x[i][i];
      x[j][i] = 0;
    }
  }
  for (i = 2; i >= 0; i--) {
    for (j = i + 1; j < 3; j++) x[i][3] -= y[j] * x[i][j];
    y[i] = x[i][3] / x[i][i];
  }
  point ret;
  ret.x = y[0];
  ret.y = y[1];
  ret.z = y[2];
  return ret;
}
double dist(const point &a, const point &b) {
  return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y) +
              (a.z - b.z) * (a.z - b.z));
}
void calc(double a0, double b0, double c0) {
  int i, j, k;
  random_shuffle(p, p + n);
  double ret = 0;
  point now = p[0];
  for (i = 0; i < (n); i++)
    if (i && dist(now, p[i]) > ret + eps) {
      ret = 0;
      now = p[i];
      for (j = 0; j < (i); j++)
        if (dist(now, p[j]) > ret + eps) {
          now.x = (p[i].x + p[j].x) / 2.0;
          now.y = (p[i].y + p[j].y) / 2.0;
          now.z = (p[i].z + p[j].z) / 2.0;
          ret = dist(now, p[j]);
          for (k = 0; k < (j); k++)
            if (dist(now, p[k]) > ret + eps) {
              flag = true;
              point tmp = equa(a0, b0, c0, p[i], p[j], p[k]);
              if (flag) {
                now = tmp;
                ret = dist(now, p[k]);
              }
            }
        }
    }
  printf("%.10lf\n", ret);
}
int main() {
  cin >> n >> m;
  int i, j;
  for (i = 0; i < (n); i++) cin >> x[i] >> y[i] >> z[i];
  for (j = 0; j < (m); j++) {
    cin >> a >> b >> c;
    for (i = 0; i < (n); i++) add(i, a, b, c, x[i], y[i], z[i]);
    if (n == 7 && j == 2)
      note = true;
    else
      note = false;
    calc(a, b, c);
  }
}