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>
#pragma comment(linker, "/STACK:65777216")
using namespace std;
int n, m;
int x[1111], y[1111], z[1111];
pair<double, double> p[1111];
const double eps = 1e-6;
void parse(int A, int B, int C, double &x, double &y, double &z) {
  double t = (A * x + B * y + C * z) / (A * A + B * B + C * C);
  x -= A * t;
  y -= B * t;
  z -= C * t;
}
pair<double, double> project(int A, int B, int C, double x, double y,
                             double z) {
  parse(A, B, C, x, y, z);
  if (B == 0 && C == 0) return pair<double, double>(y, z);
  double xx = 1, yy = 0, zz = 0;
  if (B)
    yy = (-A) / double(B);
  else if (C)
    zz = (-A) / double(C);
  double d1 = sqrt(x * x + y * y + z * z + 0.);
  if (d1 < eps) return pair<double, double>(0., 0.);
  double d2 = sqrt(B * B + C * C + 0.);
  double d3 = sqrt(x * x + (y - C) * (y - C) + (z + B) * (z + B));
  double a = (d1 * d1 + d2 * d2 - d3 * d3) / (2 * d1 * d2);
  a = acos(a);
  if (x < 0) a = -a;
  return pair<double, double>(d1 * cos(a), d1 * sin(a));
}
bool good(int A, int B, int C, double r) {
  double X = p[0].first;
  double Y = p[0].second;
  for (int i(1); i < (n); i++) {
    if ((X - p[i].first) * (X - p[i].first) +
            (Y - p[i].second) * (Y - p[i].second) <=
        r * r + eps)
      continue;
    bool found = 0;
    for (int j(0); j < (i); j++) {
      double d = (p[j].first - p[i].first) * (p[j].first - p[i].first) +
                 (p[j].second - p[i].second) * (p[j].second - p[i].second);
      if (d > 4 * r * r) return 0;
      double dx = p[j].first - p[i].first, dy = p[j].second - p[i].second;
      swap(dx, dy);
      dx = -dx;
      double z = sqrt((r * r - d / 4) / (dx * dx + dy * dy));
      dx *= z;
      dy *= z;
      for (int up(0); up < (2); up++) {
        X = (p[i].first + p[j].first) / 2 + (up ? -1 : 1) * dx,
        Y = (p[i].second + p[j].second) / 2 + (up ? -1 : 1) * dy;
        bool g = 1;
        for (int k(0); k < (i + 1); k++)
          if ((X - p[k].first) * (X - p[k].first) +
                  (Y - p[k].second) * (Y - p[k].second) >
              r * r + eps) {
            g = 0;
            break;
          }
        if (g) {
          found = 1;
          break;
        }
      }
      if (found) break;
    }
    if (!found) return 0;
  }
  return 1;
}
double solve(int A, int B, int C) {
  for (int i(0); i < (n); i++) p[i] = project(A, B, C, x[i], y[i], z[i]);
  random_shuffle(p, p + n);
  double a = 0;
  double b = 1e5;
  for (int _it(0); _it < (40); _it++) {
    double s = (a + b) / 2;
    if (good(A, B, C, s))
      b = s;
    else
      a = s;
  }
  return b;
}
int main() {
  cin >> n >> m;
  for (int i(0); i < (n); i++) scanf("%d %d %d", x + i, y + i, z + i);
  for (int i(0); i < (m); i++) {
    int A, B, C;
    scanf("%d %d %d", &A, &B, &C);
    printf("%.10lf\n", solve(A, B, C));
  }
  return 0;
}