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>
namespace B {
const double eps = 1e-8;
inline bool iszero(double x) { return fabs(x) < eps; }
template <class T>
void swap(T &a, T &b) {
  T t = a;
  a = b;
  b = t;
}
class Coor {
 public:
  double x, y;
  Coor() {}
  Coor(double xi, double yi) {
    x = xi;
    y = yi;
  }
  Coor &operator+=(const Coor &b) {
    x += b.x;
    y += b.y;
    return *this;
  }
  const Coor operator+(const Coor &b) const { return (Coor) * this += b; }
  Coor &operator-=(const Coor &b) {
    x -= b.x;
    y -= b.y;
    return *this;
  }
  const Coor operator-(const Coor &b) const { return (Coor) * this -= b; }
  Coor &operator*=(const double b) {
    x *= b;
    y *= b;
    return *this;
  }
  const Coor operator*(const double b) const { return (Coor) * this *= b; }
  Coor &operator/=(const double b) {
    x /= b;
    y /= b;
    return *this;
  }
  const Coor operator/(const double b) const { return (Coor) * this /= b; }
  const double len2() const { return x * x + y * y; }
  const double len() const { return sqrt(len2()); }
};
class Circle {
 public:
  Coor o;
  double r;
  Circle() {}
  Circle(Coor oi, double ri) { o = oi, r = ri; }
  bool inside(Coor p) { return (p - o).len2() <= r * r + eps; }
};
int n;
Coor p[10005];
inline double dot(Coor a, Coor b) { return a.x * b.x + a.y * b.y; }
inline double dot(Coor o, Coor a, Coor b) { return dot(a - o, b - o); }
inline double cross(Coor a, Coor b) { return a.x * b.y - a.y * b.x; }
inline double cross(Coor o, Coor a, Coor b) { return cross(a - o, b - o); }
const Circle circumcircle(Coor a, Coor b, Coor c) {
  Circle cir;
  double fa, fb, fc, fd, fe, ff, dx, dy, dd;
  if (iszero(cross(a, b, c))) {
    if (dot(a, b, c) <= 0) return Circle((b + c) / 2, (b - c).len() / 2);
    if (dot(b, c, a) <= 0) return Circle((c + a) / 2, (c - a).len() / 2);
    if (dot(c, a, b) <= 0) return Circle((a + b) / 2, (a - b).len() / 2);
  } else {
    fa = 2 * (a.x - b.x);
    fb = 2 * (a.y - b.y);
    fc = a.len2() - b.len2();
    fd = 2 * (a.x - c.x);
    fe = 2 * (a.y - c.y);
    ff = a.len2() - c.len2();
    dx = fc * fe - ff * fb;
    dy = fa * ff - fd * fc;
    dd = fa * fe - fd * fb;
    cir.o = Coor(dx / dd, dy / dd);
    cir.r = (a - cir.o).len();
    return cir;
  }
}
inline Circle mec(int fixed, int num) {
  int i;
  Circle cir;
  if (fixed == 3) return circumcircle(p[0], p[1], p[2]);
  cir = circumcircle(p[0], p[0], p[1]);
  for (i = fixed; i < num; i++) {
    if (cir.inside(p[i])) continue;
    swap(p[i], p[fixed]);
    cir = mec(fixed + 1, i + 1);
  }
  return cir;
}
inline int bigrand() { return (rand() << 15) + rand(); }
inline void scramble() {
  int i;
  for (i = 0; i < n / 2; i++) swap(p[rand() % n], p[rand() % n]);
}
inline double min_radius() {
  if (n <= 1) return 0.0;
  if (n == 2) return (p[0] - p[1]).len() / 2;
  scramble();
  return mec(0, n).r;
}
};  // namespace B
inline int SG(double x) {
  if (x > -1E-8 && x < 1E-8) return 0;
  return x > 0 ? 1 : -1;
}
class PT3 {
 public:
  double x, y, z;
  PT3() {}
  PT3(double _x, double _y, double _z) {
    x = _x;
    y = _y;
    z = _z;
  }
  void input() { scanf("%lf %lf %lf", &x, &y, &z); }
  PT3 operator^(const PT3 &p) const {
    return PT3(y * p.z - z * p.y, z * p.x - x * p.z, x * p.y - y * p.x);
  }
  void nrom() {
    double d = sqrt(x * x + y * y + z * z);
    x /= d;
    y /= d;
    z /= d;
  }
};
PT3 pt3[1000];
int main() {
  int n, m, i, j, mm;
  PT3 p, a, b;
  scanf("%d %d", &n, &m);
  for (i = 0; i < n; i++) {
    pt3[i].input();
  }
  for (mm = 0; mm < m; mm++) {
    p.input();
    if (SG(p.y) == 0) {
      a = PT3(0, 1, 0);
    } else {
      a = PT3(0, p.z, -p.y);
    }
    b = (p ^ a);
    a.nrom();
    b.nrom();
    for (i = 0; i < n; i++) {
      B::p[i].x = a.x * pt3[i].x + a.y * pt3[i].y + a.z * pt3[i].z;
      B::p[i].y = b.x * pt3[i].x + b.y * pt3[i].y + b.z * pt3[i].z;
    }
    B::n = n;
    printf("%.8f\n", B::min_radius());
  }
  return 0;
}