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 point {
  double x, y, z;
  point &operator-=(const point &p) {
    x -= p.x;
    y -= p.y;
    z -= p.z;
    return *this;
  }
  point &operator*=(double k) {
    x *= k;
    y *= k;
    z *= k;
    return *this;
  }
  point &operator/=(double k) {
    x /= k;
    y /= k;
    z /= k;
    return *this;
  }
  point &operator+=(const point &p) {
    x += p.x;
    y += p.y;
    z += p.z;
    return *this;
  }
  point(double x0 = 0, double y0 = 0, double z0 = 0) {
    x = x0;
    y = y0;
    z = z0;
  };
};
struct place {
  double a, b, c;
};
double GetK(const point &p, const place &pl) {
  return (pl.a * p.x + pl.b * p.y + pl.c * p.z + 0.0) /
         (pl.a * pl.a + pl.b * pl.b + pl.c * pl.c);
}
point transtoPL(const point &p, const place &pl) {
  point ans = p, normal(pl.a, pl.b, pl.c);
  double K = GetK(p, pl);
  normal *= K;
  return (ans -= normal);
}
double distanc(const point &s, const point &f) {
  return sqrt((s.x - f.x) * (s.x - f.x) + (s.y - f.y) * (s.y - f.y) +
              (s.z - f.z) * (s.z - f.z));
}
point transtoOXY(const point &p, const place &pl) {
  if (pl.a == 0 && pl.b == 0) return point(p.x, p.y, 0);
  if (pl.b == 0 && pl.c == 0) return point(p.y, p.z, 0);
  if (pl.c == 0 && pl.a == 0) return point(p.z, p.x, 0);
  point ans = transtoPL(p, pl);
  point O(0, 0, 0);
  double aa = distanc(O, ans), bb = sqrt(pl.b * pl.b + pl.c * pl.c),
         cc = sqrt(ans.x * ans.x + (pl.c + ans.y) * (pl.c + ans.y) +
                   (ans.z - pl.b) * (ans.z - pl.b));
  if (abs(aa) < eps)
    return point(0, 0, 0);
  else {
    double ang = acos((aa * aa + bb * bb - cc * cc) / (2 * aa * bb));
    if (ans.x < eps) ang = -ang;
    return point(aa * cos(ang), aa * sin(ang), 0);
  }
}
bool outside(const point cent, const point p, const double r) {
  return distanc(p, cent) > r + eps;
}
point GetC(const point &A, const point &B, const point &C) {
  double a = A.x - B.x, b = A.y - B.y,
         c = A.x * A.x + A.y * A.y - B.x * B.x - B.y * B.y;
  c /= 2;
  double d = A.x - C.x, e = A.y - C.y,
         f = A.x * A.x + A.y * A.y - C.x * C.x - C.y * C.y;
  f /= 2;
  return point((c * e - b * f) / (a * e - d * b),
               (a * f - d * c) / (a * e - b * d));
}
void createCirc3(const point &a, const point &b, const point &c, point &cent,
                 double &r) {
  cent = GetC(a, b, c);
  r = distanc(cent, a);
}
void createCirc2(const point &a, const point &b, const vector<point> &tp, int n,
                 point &cent, double &r) {
  cent = a;
  cent += b;
  cent /= 2;
  r = distanc(cent, a);
  for (int i = 0; i < n; i++)
    if (outside(cent, tp[i], r)) createCirc3(a, b, tp[i], cent, r);
}
void createCirc1(const point &a, const vector<point> &tp, int n, point &cent,
                 double &r) {
  cent = a;
  r = 0;
  for (int i = 0; i < n; i++)
    if (outside(cent, tp[i], r)) createCirc2(a, tp[i], tp, i, cent, r);
}
int main() {
  int n, m;
  cin >> n >> m;
  vector<point> p(n);
  place pl;
  for (int i = 0; i < n; i++) cin >> p[i].x >> p[i].y >> p[i].z;
  vector<point> tp(n);
  for (int i = 0; i < m; i++) {
    cin >> pl.a >> pl.b >> pl.c;
    for (int j = 0; j < n; j++) {
      tp[j] = transtoOXY(p[j], pl);
    }
    if (n == 1) {
      cout << fixed << setprecision(12) << 0.00000000 << endl;
      continue;
    }
    double curr = 0;
    random_shuffle(tp.begin(), tp.end());
    point currcent = tp[0];
    for (int j = 1; j < n; j++)
      if (outside(currcent, tp[j], curr))
        createCirc1(tp[j], tp, j, currcent, curr);
    cout << fixed << setprecision(12) << curr << endl;
  }
  return 0;
}