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;
struct point {
  double x, y, z;
  point() {}
  point(double inx, double iny, double inz) {
    x = inx;
    y = iny;
    z = inz;
  }
};
point leer() {
  double x, y, z;
  cin >> x >> y >> z;
  return point(x, y, z);
}
double prodesc(point p1, point p2) {
  return p1.x * p2.x + p1.y * p2.y + p1.z * p2.z;
}
double abs(point p) { return sqrt(prodesc(p, p)); }
point operator-(point p1, point p2) {
  p1.x -= p2.x;
  p1.y -= p2.y;
  p1.z -= p2.z;
  return p1;
}
point operator*(double a, point p) {
  p.x *= a;
  p.y *= a;
  p.z *= a;
  return p;
}
point operator*(point p, double a) {
  p.x *= a;
  p.y *= a;
  p.z *= a;
  return p;
}
point operator/(point p, double a) {
  p.x /= a;
  p.y /= a;
  p.z /= a;
  return p;
}
double cuadrat(double x) { return x * x; }
int n;
vector<point> v;
point direccion, b1, b2;
struct punt {
  double x, y;
  punt() {}
  punt(double inx, double iny) {
    x = inx;
    y = iny;
  }
};
punt operator-(punt p1, punt p2) {
  p1.x -= p2.x;
  p1.y -= p2.y;
  return p1;
}
punt operator+(punt p1, punt p2) {
  p1.x += p2.x;
  p1.y += p2.y;
  return p1;
}
punt operator*(double a, punt p) {
  p.x *= a;
  p.y *= a;
  return p;
}
punt rota(punt p) { return punt(-p.y, p.x); }
double prodvec(punt p1, punt p2) { return p1.x * p2.y - p1.y * p2.x; }
double abs(punt p) { return sqrt(p.x * p.x + p.y * p.y); }
vector<punt> w;
double error = 0.000000001;
void generabase() {
  if (direccion.x > error)
    b1 = point(-(direccion.y + direccion.z) / direccion.x, 1, 1);
  else if (direccion.y > error)
    b1 = point(1, -(direccion.x + direccion.z) / direccion.y, 1);
  else
    b1 = point(1, 1, -(direccion.x + direccion.y) / direccion.z);
  b1 = b1 / abs(b1);
  b2 = point(b1.z * direccion.y - b1.y * direccion.z,
             -(b1.z * direccion.x - b1.x * direccion.z),
             b1.y * direccion.x - b1.x * direccion.y);
  b2 = b2 / abs(b2);
}
void escribepoint(point p) {
  cout << "(" << p.x << "," << p.y << "," << p.z << ")";
}
void generaw() {
  generabase();
  w = vector<punt>(n);
  for (int i = 0; i < n; i++) w[i] = punt(prodesc(v[i], b1), prodesc(v[i], b2));
}
punt maslejano(punt p) {
  punt q = p;
  for (int i = 0; i < n; i++)
    if (abs(w[i] - p) > abs(q - p)) q = w[i];
  return q;
}
punt interseccion(punt p1, punt v1, punt p2, punt v2) {
  return p1 + (prodvec(p2 - p1, v2) / prodvec(v1, v2)) * v1;
}
double obtenminimo() {
  random_shuffle(w.begin(), w.end());
  punt o = w[0];
  double r = 0;
  for (int i = 1; i < n; i++) {
    if (abs(o - w[i]) > r + error) {
      o = w[i];
      r = 0;
      for (int j = 0; j < i; j++) {
        if (abs(o - w[j]) > r + error) {
          o = 0.5 * (w[i] + w[j]);
          r = abs(o - w[j]);
          for (int k = 0; k < j; k++) {
            if (abs(o - w[k]) > r + error) {
              o = interseccion(0.5 * (w[i] + w[j]), rota(w[j] - w[i]),
                               0.5 * (w[i] + w[k]), rota(w[k] - w[i]));
              r = abs(o - w[k]);
            }
          }
        }
      }
    }
  }
  return r;
}
int main() {
  cout.setf(ios::fixed);
  cout.precision(10);
  cin >> n;
  int m;
  cin >> m;
  v = vector<point>(n);
  for (int i = 0; i < n; i++) v[i] = leer();
  for (int cas = 0; cas < m; cas++) {
    direccion = leer();
    generaw();
    cout << obtenminimo() << endl;
  }
}