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-10;
inline int sgn(double x) { return (x > eps) - (x < -eps); }
class vec2 {
 public:
  double x, y;
  vec2() {}
  vec2(double tx, double ty) { x = tx, y = ty; }
  vec2 operator+(const vec2 &t) const { return vec2(x + t.x, y + t.y); };
  vec2 operator-(const vec2 &t) const { return vec2(x - t.x, y - t.y); };
  double operator*(const vec2 &t) const { return x * t.y - y * t.x; }
  double len() { return x * x + y * y; }
};
vec2 projection(double a, double b, double c, double d, double e, double f) {
  if (!sgn(a) && !sgn(b)) return vec2(d, e);
  if (!sgn(b) && !sgn(c)) return vec2(e, f);
  if (!sgn(c) && !sgn(a)) return vec2(f, d);
  double t = -(a * d + b * e + c * f) / (a * a + b * b + c * c);
  double x = d + t * a, y = e + t * b, z = f + t * c;
  double A = sqrt(x * x + y * y + z * z), B = sqrt(b * b + c * c),
         C = sqrt(x * x + (c + y) * (c + y) + (z - b) * (z - b));
  if (fabs(A) < eps) return vec2(0, 0);
  double ang = acos((A * A + B * B - C * C) / (2 * A * B));
  if (x < 0) ang = -ang;
  return vec2(A * cos(ang), A * sin(ang));
}
double xs[1010], ys[1010], zs[1010];
int n, m;
vec2 v[1010];
mt19937 rnd(2094890);
bool getcenter(vec2 v1, vec2 v2, vec2 v3, vec2 &ret) {
  if (sgn((v2 - v1) * (v3 - v2)) == 0) return 0;
  double a = v1.x - v2.x, b = v1.y - v2.y, c = v1.x - v3.x, d = v1.y - v3.y;
  double e = (v1.len() - v2.len()) / 2, f = (v1.len() - v3.len()) / 2;
  ret = vec2((b * f - d * e) / (b * c - a * d),
             (c * e - a * f) / (b * c - a * d));
  return 1;
}
inline double solve(vec2 *v, int n) {
  shuffle(v + 1, v + n + 1, rnd);
  vec2 O(0, 0);
  double R = 0;
  for (int i = 1; i <= n; i++) {
    if (sqrt((v[i] - O).len()) > R + eps) {
      O = v[i];
      R = 0;
      for (int j = 1; j < i; j++) {
        if (sqrt((v[j] - O).len()) > R + eps) {
          O = (v[i] + v[j]);
          O.x /= 2;
          O.y /= 2;
          R = sqrt((v[i] - O).len());
          for (int k = 1; k < j; k++) {
            if (sqrt((v[k] - O).len()) > R + eps) {
              getcenter(v[i], v[j], v[k], O);
              R = sqrt((v[i] - O).len());
            }
          }
        }
      }
    }
  }
  return R;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%lf%lf%lf", &xs[i], &ys[i], &zs[i]);
  while (m--) {
    int a, b, c;
    scanf("%d%d%d", &a, &b, &c);
    for (int i = 1; i <= n; i++)
      v[i] = projection(a, b, c, xs[i], ys[i], zs[i]);
    printf("%.8lf\n", solve(v, n));
  }
  return 0;
}