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-8;
int sign(double x) { return x < -EPS ? -1 : x > EPS; }
namespace Geo3D {
struct Point {
  double x, y, z;
  void read() { scanf("%lf%lf%lf", &x, &y, &z); }
  Point() {}
  Point(double _x, double _y, double _z) : x(_x), y(_y), z(_z) {}
  Point operator+(Point p) { return Point(x + p.x, y + p.y, z + p.z); }
  Point operator-(Point p) { return Point(x - p.x, y - p.y, z - p.z); }
  Point operator*(double f) { return Point(x * f, y * f, z * f); }
  Point operator/(double f) { return Point(x / f, y / f, z / f); }
  double dot(Point p) { return x * p.x + y * p.y + z * p.z; }
  Point det(Point p) {
    return Point(y * p.z - z * p.y, z * p.x - x * p.z, x * p.y - y * p.x);
  }
  double abs() { return sqrt(x * x + y * y + z * z); }
  Point norm() { return *this / abs(); }
  void write() { cout << x << " " << y << " " << z << endl; }
};
Point proj(Point p, Point o, Point q) {
  double d = (q - p).dot(o);
  return q - o * d;
}
}  // namespace Geo3D
namespace Geo2D {
struct Point {
  double x, y;
  Point() {}
  Point(double _x, double _y) : x(_x), y(_y) {}
  Point operator+(const Point& p) const { return Point(x + p.x, y + p.y); }
  Point operator-(const Point& p) const { return Point(x - p.x, y - p.y); }
  Point operator*(double d) const { return Point(x * d, y * d); }
  Point operator/(double d) const { return Point(x / d, y / d); }
  double det(const Point& p) const { return x * p.y - y * p.x; }
  double dot(const Point& p) const { return x * p.x + y * p.y; }
  double alpha() const { return atan2(y, x); }
  Point rot90() const { return Point(-y, x); }
  void read() { scanf("%lf%lf", &x, &y); }
  void write() const { printf("%lf %lf", x, y); }
  double abs() { return hypot(x, y); }
  Point unit() { return *this / abs(); }
  double distTo(const Point& p) const { return hypot(x - p.x, y - p.y); }
  bool operator<(const Point& p) const {
    int cx = sign(x - p.x);
    if (cx) return cx == -1;
    return sign(y - p.y) == -1;
  }
};
Point isSS(Point p1, Point p2, Point q1, Point q2) {
  double a1 = ((q2.x - q1.x) * (p1.y - q1.y) - (p1.x - q1.x) * (q2.y - q1.y)),
         a2 = -((q2.x - q1.x) * (p2.y - q1.y) - (p2.x - q1.x) * (q2.y - q1.y));
  return (p1 * a2 + p2 * a1) / (a1 + a2);
}
Point circleCenter(Point p1, Point p2, Point p3) {
  Point m1 = (p1 + p2) / 2, d1 = m1 + (p2 - p1).rot90();
  Point m2 = (p1 + p3) / 2, d2 = m2 + (p3 - p1).rot90();
  return isSS(m1, d1, m2, d2);
}
double minCircle(vector<Point> ps) {
  Point c(0, 0);
  double r = 0;
  random_shuffle(ps.begin(), ps.end());
  for (int i = 0; i < ps.size(); ++i) {
    if (ps[i].distTo(c) > r + EPS) {
      c = ps[i], r = 0;
      for (int j = 0; j < i; ++j) {
        if (ps[j].distTo(c) > r + EPS) {
          c = (ps[i] + ps[j]) / 2, r = ps[i].distTo(c);
          for (int k = 0; k < j; ++k) {
            if (ps[k].distTo(c) > r + EPS) {
              c = circleCenter(ps[i], ps[j], ps[k]), r = ps[i].distTo(c);
            }
          }
        }
      }
    }
  }
  return r;
}
}  // namespace Geo2D
double randDouble(double max) { return 1.0 * rand() / RAND_MAX * max; }
using namespace Geo3D;
int main() {
  int n, m;
  cin >> n >> m;
  vector<Point> ps(n);
  for (int i = 0; i < n; ++i) {
    ps[i].read();
  }
  for (int it = 0; it < m; ++it) {
    Point o;
    o.read();
    o = o.norm();
    Point p1(0, 0, 0);
    Point dx =
        proj(p1, o, Point(randDouble(100), randDouble(100), randDouble(100)))
            .norm();
    Point dy = dx.det(o).norm();
    vector<Geo2D::Point> qs;
    for (int i = 0; i < n; ++i) {
      qs.push_back(Geo2D::Point(ps[i].dot(dx), ps[i].dot(dy)));
    }
    printf("%0.10lf\n", Geo2D::minCircle(qs));
  }
  return 0;
}