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 MaxN = 1200;
const double oo = 1e100;
const double eps = 1e-8;
const int ord[][4] = {{0, 1, 3, 2}, {0, 2, 3, 1}, {1, 2, 3, 0}};
double A, B, C;
double M[3][3];
int sgn(double x) { return x < -eps ? -1 : x > eps; }
int dbcmp(double x, double y) { return sgn(x - y); }
double sqr(double x) { return x * x; }
struct Point {
  double x, y, z;
  Point() {}
  Point(double x, double y, double z) : x(x), y(y), z(z) {}
  Point operator+(const Point& p) const {
    return Point(x + p.x, y + p.y, z + p.z);
  }
  Point operator-(const Point& p) const {
    return Point(x - p.x, y - p.y, z - p.z);
  }
  double operator*(const Point& p) const { return x * p.y - y * p.x; }
  Point operator*(const double& d) const { return Point(x * d, y * d, z * d); }
  Point operator/(const double& d) const { return Point(x / d, y / d, z / d); }
  bool operator<(const Point& p) const {
    if (sgn(y - p.y))
      return y < p.y;
    else
      return x < p.x;
  }
  Point operator^(const Point& p) const {
    return Point(y * p.z - z * p.y, z * x - x * p.z, x * p.y - y * p.x);
  }
  int operator&(const Point& p) const {
    return sgn(x * p.x + y * p.y + z * p.z);
  }
  double norm() const { return hypot(x, y); }
  double norm2() const { return x * x + y * y; }
  void init() { scanf("%lf%lf%lf", &x, &y, &z); }
} p[MaxN], tp[MaxN];
int n, m;
int xmult(const Point& p1, const Point& p2, const Point& p) {
  return sgn((p1 - p) * (p2 - p));
}
void read() {
  for (int i = 0; i < n; i++) tp[i].init();
}
void rotate() {
  double x[3];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 3; j++)
      x[j] = M[j][0] * p[i].x + M[j][1] * p[i].y + M[j][2] * p[i].z;
    p[i].x = x[0];
    p[i].y = x[1];
    p[i].z = x[2];
  }
}
void getM(double a, double b, double& m11, double& m12, double& m21,
          double& m22) {
  m11 = m22 = b / hypot(a, b);
  m21 = a / hypot(a, b);
  m12 = -m21;
}
void init() {
  for (int i = 0; i < n; i++) p[i] = tp[i];
  if (sgn(A)) {
    memset(M, 0, sizeof(M));
    M[2][2] = 1;
    getM(A, B, M[0][0], M[0][1], M[1][0], M[1][1]);
    rotate();
    B = hypot(A, B);
  }
  if (sgn(B)) {
    memset(M, 0, sizeof(M));
    M[0][0] = 1;
    getM(B, C, M[1][1], M[1][2], M[2][1], M[2][2]);
    rotate();
    C = hypot(B, C);
  }
}
struct Line {
  Point a, b;
  Line() {}
  Line(const Point& a, const Point& b) : a(a), b(b) {}
};
struct Circle {
  Point o;
  double r;
} cir;
inline void CircleCenter(Point p0, Point p1, Point p2, Point& cp) {
  double a1 = p1.x - p0.x, b1 = p1.y - p0.y, c1 = (sqr(a1) + sqr(b1)) / 2;
  double a2 = p2.x - p0.x, b2 = p2.y - p0.y, c2 = (sqr(a2) + sqr(b2)) / 2;
  double d = a1 * b2 - a2 * b1;
  cp.x = p0.x + (c1 * b2 - c2 * b1) / d;
  cp.y = p0.y + (a1 * c2 - a2 * c1) / d;
}
inline bool check(const Point& a) { return (a - cir.o).norm2() <= cir.r + eps; }
inline void doit(Point* p, int n) {
  cir.r = 0;
  cir.o = Point(0, 0, 0);
  srand(time(NULL));
  random_shuffle(p, p + n);
  for (int i = 0; i < n; ++i)
    if (!check(p[i])) {
      cir.o = p[i];
      cir.r = 0;
      for (int j = 0; j < i; ++j)
        if (!check(p[j])) {
          cir.o = (p[i] + p[j]) / 2;
          cir.r = (cir.o - p[i]).norm2();
          for (int k = 0; k < j; ++k)
            if (!check(p[k])) {
              CircleCenter(p[i], p[j], p[k], cir.o);
              cir.r = (cir.o - p[i]).norm2();
            }
        }
    }
  printf("%.10f\n", sqrt(fabs(cir.r)));
}
int main() {
  while (scanf("%d%d", &n, &m) == 2) {
    read();
    while (m--) {
      scanf("%lf%lf%lf", &A, &B, &C);
      init();
      doit(p, n);
    }
  }
  return 0;
}