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>
const double eps = 1e-8;
int sgn(double x) { return (x > eps) - (x < -eps); }
struct Point {
  double x, y, z;
  Point() {}
  Point(double x, double y, double z) : x(x), y(y), z(z) {}
  Point operator+(const Point& a) const {
    return Point(x + a.x, y + a.y, z + a.z);
  }
  Point operator-(const Point& a) const {
    return Point(x - a.x, y - a.y, z - a.z);
  }
  Point operator/(const double a) const { return Point(x / a, y / a, z / a); }
  Point operator*(const double a) const { return Point(x * a, y * a, z * a); }
  Point operator*(const Point& a) const {
    return Point(y * a.z - z * a.y, z * a.x - x * a.z, x * a.y - y * a.x);
  }
  double operator&(const Point& a) const { return x * a.x + y * a.y + z * a.z; }
  void input() { scanf("%lf%lf%lf", &x, &y, &z); }
  void output() { printf("%.10f %.10f %.10f\n", x, y, z); }
} p[1010], tp[1010], q[1010];
int np, nq;
struct Sphere {
  Point o;
  double r2;
  Sphere() {}
  Sphere(Point o, double r2) : o(o), r2(r2) {}
} ans;
double dist(Point a, 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)));
}
bool inside(const Sphere s, const Point p) {
  return sgn(dist(s.o, p) - s.r2) <= 0;
}
void solve4(const Point p[], Sphere& s) {
  Point n1 = p[1] - p[0], n2 = p[2] - p[0], n3 = p[3] - p[0];
  double d1 = n1 & (p[0] + p[1]) / 2, d2 = n2 & (p[0] + p[2]) / 2,
         d3 = n3 & (p[0] + p[3]) / 2;
  s.o = (n1 * n2 * d3 + n2 * n3 * d1 + n3 * n1 * d2) / (n1 & (n2 * n3));
  s.r2 = dist(s.o, p[0]);
}
void solve3(const Point p[], Sphere& s) {
  Point n1 = p[1] - p[0], n2 = p[2] - p[0], n3 = n1 * n2;
  double d1 = n1 & (p[0] + p[1]) / 2, d2 = n2 & (p[0] + p[2]) / 2,
         d3 = n3 & p[0];
  s.o = (n1 * n2 * d3 + n2 * n3 * d1 + n3 * n1 * d2) / (n1 & (n2 * n3));
  s.r2 = dist(s.o, p[0]);
}
bool miniSphere(Point p[], int np, Point q[], int nq, Sphere& res) {
  if (np == 0) {
    if (nq == 0)
      return false;
    else if (nq == 1)
      res = Sphere(q[0], 0);
    else if (nq == 2)
      res = Sphere((q[0] + q[1]) / 2, dist(q[0], q[1]) / 2);
    else if (nq == 3)
      solve3(q, res);
    return true;
  }
  std::swap(p[rand() % np], p[np - 1]);
  if (miniSphere(p, np - 1, q, nq, res) && inside(res, p[np - 1])) return true;
  q[nq++] = p[np - 1];
  if (nq <= 3)
    miniSphere(p, np - 1, q, nq, res);
  else
    solve4(q, res);
  return true;
}
int main() {
  int n, m;
  while (scanf("%d%d", &n, &m) == 2) {
    for (int i = 0; i < n; i++) scanf("%lf%lf%lf", &p[i].x, &p[i].y, &p[i].z);
    for (int i = 0; i < m; i++) {
      double a, b, c;
      scanf("%lf%lf%lf", &a, &b, &c);
      for (int j = 0; j < n; j++) {
        double tnum = a * p[j].x + b * p[j].y + c * p[j].z;
        double delta = tnum / (a * a + b * b + c * c);
        tp[j] = p[j] - Point(delta * a, delta * b, delta * c);
      }
      np = n;
      nq = 0;
      miniSphere(tp, np, q, nq, ans);
      printf("%.10f\n", ans.r2);
    }
  }
  return 0;
}