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;
int testnum;
struct Point3 {
  double x, y, z;
  Point3(double _x = 0, double _y = 0, double _z = 0) {
    x = _x;
    y = _y;
    z = _z;
  }
  bool operator==(Point3 other) {
    return abs(x - other.x) < 1e-9 && abs(y - other.y) < 1e-9 &&
           abs(z - other.z) < 1e-9;
  }
  bool operator!=(Point3 other) {
    return abs(x - other.x) > 1e-9 || abs(y - other.y) > 1e-9 ||
           abs(z - other.z) > 1e-9;
  }
  double length() { return sqrt(x * x + y * y + z * z); }
  Point3 operator*(double k) { return Point3(k * x, k * y, k * z); }
  Point3 normalize() { return (*this) * (1 / length()); }
  Point3 operator+(Point3 other) {
    return Point3(x + other.x, y + other.y, z + other.z);
  }
  Point3 operator-(Point3 other) {
    return Point3(x - other.x, y - other.y, z - other.z);
  }
  double dist(Point3 other) { return (*this - other).length(); }
  double operator^(Point3 other) {
    return x * other.x + y * other.y + z * other.z;
  }
  Point3 operator*(Point3 other) {
    return Point3(y * other.z - z * other.y, z * other.x - x * other.z,
                  x * other.y - y * other.x);
  }
  void display() { printf("Point3 (%lf , %lf , %lf)\n", x, y, z); }
};
Point3 operator*(double k, Point3 p) {
  return Point3(k * p.x, k * p.y, k * p.z);
}
struct Point2 {
  double x, y;
  Point2(double _x = 0, double _y = 0) {
    x = _x;
    y = _y;
  }
  double length() { return sqrt(x * x + y * y); }
  Point2 operator*(double k) { return Point2(k * x, k * y); }
  Point2 normalize() { return (*this) * (1 / length()); }
  Point2 operator+(Point2 other) { return Point2(x + other.x, y + other.y); }
  Point2 operator-(Point2 other) { return Point2(x - other.x, y - other.y); }
  double dist(Point2 other) { return (*this - other).length(); }
  double operator^(Point2 other) { return x * other.x + y * other.y; }
  double operator*(Point2 other) { return x * other.y - y * other.x; }
  void display() { printf("Point2 (%lf , %lf)\n", x, y); }
};
Point2 operator*(double k, Point2 p) { return Point2(k * p.x, k * p.y); }
struct Plane {
  double a, b, c, d;
  Point3 A, B, C;
  Point3 N, O, X, Y;
  Plane() {}
  Plane(Point3 _AA, Point3 _BB, Point3 _CC) {
    A = _AA;
    B = _BB;
    C = _CC;
    Point3 normal = (B - A) * (C - A);
    N = normal.normalize();
    a = N.x;
    b = N.y;
    c = N.z;
    d = -(A ^ N);
    O = Point3(-d * a, -d * b, -d * c);
    if (A != O)
      X = (A - O).normalize();
    else
      X = (B - O).normalize();
    Y = normal * X;
  }
  Plane(double _a, double _b, double _c, double _d) {
    double len = sqrt(_a * _a + _b * _b + _c * _c);
    a = _a / len;
    b = _b / len;
    c = _c / len;
    d = _d / len;
    N = Point3(a, b, c);
    if (a != 0) {
      A = Point3(-(d + 0 * b + 0 * c) / a, 0, 0);
      B = Point3(-(d + 1 * b + 0 * c) / a, 1, 0);
      C = Point3(-(d + 0 * b + 1 * c) / a, 0, 1);
    } else if (b != 0) {
      A = Point3(0, -(d + 0 * a + 0 * c) / b, 0);
      B = Point3(1, -(d + 1 * a + 0 * c) / b, 0);
      C = Point3(0, -(d + 0 * a + 1 * c) / b, 1);
    } else {
      A = Point3(0, 0, -(d + 0 * a + 0 * b) / c);
      B = Point3(1, 0, -(d + 1 * a + 0 * b) / c);
      C = Point3(0, 1, -(d + 0 * a + 1 * b) / c);
    }
    O = Point3(-d * a, -d * b, -d * c);
    if (A != O)
      X = (A - O).normalize();
    else
      X = (B - O).normalize();
    Y = N * X;
  }
  Point3 project(Point3 P) { return (P - (P ^ N) * N) + O; }
  Point2 project2D(Point3 P) {
    P = project(P);
    return Point2(P ^ X, P ^ Y);
  }
  double distance(Point3 p) { return abs(a * p.x + b * p.y + c * p.z + d); }
  void display() {
    printf("Plane (%lf , %lf , %lf , %lf)\n", a, b, c, d);
    printf("A : ");
    A.display();
    printf("B : ");
    B.display();
    printf("C : ");
    C.display();
    printf("N : ");
    N.display();
    printf("O : ");
    O.display();
    printf("X : ");
    X.display();
    printf("Y : ");
    Y.display();
  }
};
void preprocess() {}
int n, m;
vector<Point3> p3;
vector<Point2> p2;
vector<Plane> plns;
double eval(double x, double y) {
  double ans = 0;
  double dx, dy;
  for (int i = 0; i < n; i++) {
    dx = x - p2[i].x;
    dy = y - p2[i].y;
    ans = max(ans, dx * dx + dy * dy);
  }
  return ans;
}
pair<double, double> doTernaryY(double x) {
  double lo = 1e4;
  double hi = 0;
  for (int i = 0; i < n; i++) {
    lo = min(lo, p2[i].y);
    hi = max(hi, p2[i].y);
  }
  for (int iter = 0; iter < 35; iter++) {
    double y1 = (lo + lo + hi) / 3;
    double y2 = (lo + hi + hi) / 3;
    double val1 = eval(x, y1);
    double val2 = eval(x, y2);
    if (val1 < val2)
      hi = y2;
    else
      lo = y1;
  }
  double ans = (lo + hi) / 2;
  return make_pair(ans, eval(x, ans));
}
pair<double, double> doTernaryX() {
  double lo = 1e4;
  double hi = 0;
  for (int i = 0; i < n; i++) {
    lo = min(lo, p2[i].x);
    hi = max(hi, p2[i].x);
  }
  for (int iter = 0; iter < 35; iter++) {
    double x1 = (lo + lo + hi) / 3;
    double x2 = (lo + hi + hi) / 3;
    double val1 = doTernaryY(x1).second;
    double val2 = doTernaryY(x2).second;
    if (val1 < val2)
      hi = x2;
    else
      lo = x1;
  }
  double ans = (lo + hi) / 2;
  return make_pair(ans, doTernaryY(ans).first);
}
void solve() {
  p2.resize(n);
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) p2[j] = plns[i].project2D(p3[j]);
    pair<double, double> centre = doTernaryX();
    double rad = sqrt(eval(centre.first, centre.second));
    printf("%.9lf\n", rad);
  }
}
bool input() {
  scanf("%d", &n);
  scanf("%d", &m);
  p3.resize(n);
  plns.resize(m);
  int a, b, c;
  for (int i = 0; i < n; i++) {
    scanf("%d", &a);
    scanf("%d", &b);
    scanf("%d", &c);
    p3[i] = Point3(a, b, c);
  }
  for (int i = 0; i < m; i++) {
    scanf("%d", &a);
    scanf("%d", &b);
    scanf("%d", &c);
    plns[i] = Plane(a, b, c, 0);
  }
  return true;
}
int main() {
  preprocess();
  int T = 1;
  for (testnum = 1; testnum <= T; testnum++) {
    if (!input()) break;
    solve();
  }
}