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 N = 1005;
int n, Q;
struct P3 {
  double x, y, z;
  P3() {}
  P3(double _x, double _y, double _z) {
    x = _x;
    y = _y;
    z = _z;
  }
  void init() { scanf("%lf%lf%lf", &x, &y, &z); }
  double operator*(const P3 &a) const { return x * a.x + y * a.y + z * a.z; }
  P3 operator*(const double &a) const { return P3(x * a, y * a, z * a); }
  P3 operator+(const P3 &a) const { return P3(x + a.x, y + a.y, z + a.z); }
  P3 operator-(const P3 &a) const { return P3(x - a.x, y - a.y, z - a.z); }
  P3 ord() {
    P3 xx = *this;
    return xx * sqrt(1 / (xx * xx));
  }
} P[N];
struct P2 {
  double x, y;
  P2() {}
  P2(double _x, double _y) {
    x = _x;
    y = _y;
  }
  P2 operator+(const P2 &a) const { return P2(x + a.x, y + a.y); }
  P2 operator-(const P2 &a) const { return P2(x - a.x, y - a.y); }
  P2 operator*(const double &a) const { return P2(x * a, y * a); }
  double operator*(const P2 &a) const { return x * a.y - y * a.x; }
  P2 rot() { return P2(y, -x); }
} a[N];
double dis(P2 x, P2 y) {
  return sqrt((x.x - y.x) * (x.x - y.x) + (x.y - y.y) * (x.y - y.y));
}
P2 solve(P3 x, P3 y) {
  y = y - x * ((x * y) / (x * x));
  assert(fabs(y * x) < 1e-9);
  if (fabs(x.x) < 1e-9) swap(x.x, x.y), swap(y.x, y.y);
  if (fabs(x.x) < 1e-9) swap(x.x, x.z), swap(y.x, y.z);
  if (fabs(x.y) < 1e-9 && fabs(x.z) < 1e-9) return P2(y.y, y.z);
  P3 p1(-(x.y * x.y + x.z * x.z) / x.x, x.y, x.z);
  P3 p2(0, x.z, -x.y);
  p1 = p1.ord();
  p2 = p2.ord();
  P2 ans;
  P3 tmp = y;
  ans.y = y.x / p1.x;
  y = y - p1 * ans.y;
  if (fabs(p2.z) > 0)
    ans.x = y.z / p2.z;
  else
    ans.x = y.y / p2.y;
  tmp = tmp - p2 * ans.x;
  tmp = tmp - p1 * ans.y;
  assert(fabs(p1 * x) < 1e-9);
  assert(fabs(p2 * x) < 1e-9);
  assert(fabs(p1 * p2) < 1e-9);
  assert(fabs(p1 * p1 - 1) < 1e-9);
  assert(fabs(p2 * p2 - 1) < 1e-9);
  assert(fabs(tmp.x) < 1e-9);
  assert(fabs(tmp.y) < 1e-9);
  assert(fabs(tmp.z) < 1e-9);
  return ans;
}
P2 Cir(P2 x, P2 y, P2 z) {
  P2 m1 = (x + y) * 0.5, m2 = (x + z) * 0.5;
  P2 d1 = (y - x).rot() + m1, d2 = (z - x).rot() + m2;
  double ar1 = (d1 - m2) * (d2 - m2), ar2 = (d2 - m2) * (m1 - m2);
  if (fabs(ar2) == 0) return m2;
  return m1 + (d1 - m1) * (ar2 / (ar1 + ar2));
}
double min_cir() {
  random_shuffle(a + 1, a + n + 1);
  P2 o = a[1];
  double r = 0;
  for (int i = (int)(1); i <= (int)(n); i++)
    if (dis(o, a[i]) > r + 1e-8) {
      o = a[i], r = 0;
      for (int j = (int)(1); j <= (int)(i - 1); j++)
        if (dis(o, a[j]) > r + 1e-8) {
          o = (a[i] + a[j]) * 0.5;
          r = dis(o, a[j]);
          for (int k = (int)(1); k <= (int)(j - 1); k++)
            if (dis(o, a[k]) > r + 1e-8) {
              o = Cir(a[i], a[j], a[k]), r = dis(o, a[k]);
              double r1 = dis(a[i], o), r2 = dis(a[j], o);
            }
        }
    }
  return r;
}
int main() {
  scanf("%d%d", &n, &Q);
  for (int i = (int)(1); i <= (int)(n); i++) P[i].init();
  while (Q--) {
    P3 x;
    x.init();
    for (int i = (int)(1); i <= (int)(n); i++) a[i] = solve(x, P[i]);
    printf("%.10lf\n", min_cir());
  }
}