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 = 1010;
const double eps = 1e-8;
inline int sign(double x) { return x < -eps ? -1 : x > eps; }
struct Point3D {
  double x, y, z;
  Point3D() {}
  Point3D(double _x, double _y, double _z) : x(_x), y(_y), z(_z) {}
  Point3D operator+(const Point3D &o) const {
    return Point3D(x + o.x, y + o.y, z + o.z);
  }
  Point3D operator-(const Point3D &o) const {
    return Point3D(x - o.x, y - o.y, z - o.z);
  }
  Point3D operator*(double o) { return Point3D(x * o, y * o, z * o); }
  Point3D operator/(double o) { return Point3D(x / o, y / o, z / o); }
  double dot(const Point3D &o) const { return x * o.x + y * o.y + z * o.z; }
  Point3D det(const Point3D &o) const {
    return Point3D(y * o.z - z * o.y, z * o.x - x * o.z, x * o.y - y * o.x);
  }
  Point3D unit() { return *this / abs(); }
  double abs() { return sqrt((x * x) + (y * y) + (z * z)); }
  void show() { cout << x << ' ' << y << ' ' << z << endl; }
  void read() { scanf("%lf%lf%lf", &x, &y, &z); }
};
struct Point {
  double x, y;
  Point() {}
  Point(double _x, double _y) : x(_x), y(_y) {}
  Point operator+(const Point &o) const { return Point(x + o.x, y + o.y); }
  Point operator-(const Point &o) const { return Point(x - o.x, y - o.y); }
  Point operator*(double o) { return Point(x * o, y * o); }
  Point operator/(double o) { return Point(x / o, y / o); }
  double dot(const Point &o) const { return x * o.x + y * o.y; }
  double det(const Point &o) const { return x * o.y - y * o.x; }
  void read() { scanf("%lf%lf", &x, &y); }
  void show() { cout << x << ' ' << y << endl; }
  double abs() { return sqrt((x * x) + (y * y)); }
  Point unit() { return *this / abs(); }
  friend double dis(Point x) { return x.abs(); };
};
int n, m;
Point3D p[N];
Point ps[N];
inline bool check(const Point &p0, const Point &s, double r) {
  return sign(dis(p0 - s) - r) > 0;
}
Point circumCenter(const Point &a, const Point &b, const Point &c) {
  double a1 = b.x - a.x, b1 = b.y - a.y, c1 = (a1 * a1 + b1 * b1) / 2;
  double a2 = c.x - a.x, b2 = c.y - a.y, c2 = (a2 * a2 + b2 * b2) / 2;
  double d = a1 * b2 - a2 * b1;
  return Point(a.x + (c1 * b2 - c2 * b1) / d, a.y + (a1 * c2 - a2 * c1) / d);
}
double minCircleCover() {
  random_shuffle(ps, ps + n);
  Point s = ps[0];
  double r = 0;
  for (int i = 1; i < n; ++i)
    if (check(ps[i], s, r)) {
      s = ps[i];
      r = 0;
      for (int j = 0; j < i; ++j)
        if (check(ps[j], s, r)) {
          s = (ps[i] + ps[j]) / 2;
          r = dis(ps[j] - s);
          for (int k = 0; k < j; ++k)
            if (check(ps[k], s, r)) {
              s = circumCenter(ps[i], ps[j], ps[k]);
              r = dis(ps[k] - s);
            }
        }
    }
  return r;
}
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; ++i) p[i].read();
  for (int i = 0; i < m; ++i) {
    double a, b, c;
    scanf("%lf %lf %lf", &a, &b, &c);
    Point3D pn(a, b, c), dx, dy, o(0, 0, 0);
    if (sign(a))
      dx = Point3D(-c / a, 0, 1);
    else if (sign(b))
      dx = Point3D(1, -a / b, 0);
    else
      dx = Point3D(1, 0, -a / c);
    dy = pn.det(dx);
    dx = dx.unit(), dy = dy.unit();
    for (int i = 0; i < n; ++i) ps[i] = Point(p[i].dot(dx), p[i].dot(dy));
    printf("%.10f\n", minCircleCover());
  }
  return 0;
}