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 JAVA):

Solution:
import java.util.Scanner;
import java.util.SortedMap;
import java.util.TreeMap;

public class E {

	private static final double EPS = 1e-8;
	
   	private E (Scanner sc) throws Throwable {
		int N = sc.nextInt();
		int M = sc.nextInt();
		
		double [][] X = new double [N][];
		for (int i = 0; i < N; ++i)
			X[i] = new double [] { sc.nextInt(),sc.nextInt(),sc.nextInt() };
		
		double [][] A = new double [M][];
		for (int i = 0; i < M; ++i)
			A[i] = new double [] { sc.nextInt(),sc.nextInt(),sc.nextInt() };
		for (int i = 0; i < M; ++i)
			solve(X, A[i]);
	}
	
	private void solve (double [][] X, double [] A) throws Throwable {
		// Project X on plane
		double [][] Y = new double [X.length][];
		for (int i = 0; i < X.length; ++i)
			Y[i] = project(X[i], A);
		
		// Rotate plane, so that z = 0
		double [] K = new double [] { -A[1], A[0], 0 };
		if (!isZero(K))
			Y = rodrigues(Y, normalize(K));
		
		// Welzl Algorithm
		Y = randomize(Y);		
		double [][] S = new double [3][];
		double [] C = welzl(Y, Y.length, S, 0);
		
		print(C[C.length - 1]);
	}

	double [] project(double [] X, double [] A) {
		return diff(X, scalar(dot(X,A)/dot(A,A), A));
	}
	
	double [][] rodrigues(double [][] X, double [] K) {
		// Rotate to z=0, K is unit vector in X and z=0 planes
		double [] V = null;
		for (double [] x : X) {
			double [] v = project(x,K);
			if (!isZero(v))
				V = v;
		}
		
		if (V == null)
			return X;
		
		double [] T = new double [] { 
				dot(new double [] { K[1], -K[0] }, V), 
				V[2] };
		T = normalize(T);
		
		double [] w = scalar(T[0] ,V);
		w = sum(w, scalar(T[1] ,cross(K,V)));
		w = sum(w, scalar(dot(K,V)*(1-T[0]), K));

		for (int i = 0; i < X.length; ++i) {
			double [] x = scalar(T[0] ,X[i]);
			x = sum(x, scalar(T[1] ,cross(K,X[i])));
			x = sum(x, scalar(dot(K,X[i])*(1-T[0]), K));
			X[i] = x;
		}		
		return X;
	}
	
	double [] welzl(double [][] X, int N, double [][] S, int B) {
		if (B == 3)
			return circle(S[0], S[1], S[2]);
		else if (N == 1 && B == 0)
			return new double [] { X[0][0], X[0][1], X[0][2], 0 };
		else if (N == 0 && B == 2)
			return circle (S[0], S[1]);
		else if (N == 1 && B == 1)
			return circle (S[0], X[0]);
		else {
			double [] C = welzl(X, N-1, S, B);
			if (dist (new double [] { C[0], C[1], C[2] }, X[N-1]) > C[3] + EPS) {
				S[B++] = X[N-1];
				C = welzl(X, N-1, S, B);
			}
			return C;
		}
	}
	
	double [] circle(double [] a, double [] b) {
		double d = dist(a,b);
		double [] C = new double [a.length+1];
		for (int i = 0; i < a.length; ++i)
			C[i] = (a[i] + b[i])/2;
		C[a.length] = d/2;
		return C;
	}

	boolean close(double x, double y) {
		return Math.abs(x-y) < EPS;
	}
	
	double [] circle(double [] a, double [] b, double [] c) {
		if (close(a[0],b[0]) && close(b[0],c[0]))
			return collinear(a,b,c);
		else if (close(a[0],b[0]))
			return circle(b,c,a);
		else if (close(b[0],c[0]))
			return circle(c,a,b);
		else {
			double ma = (b[1] - a[1])/(b[0] - a[0]);
			if (close(ma,0))
				return circle(c,b,a);
			double mb = (c[1] - b[1])/(c[0] - b[0]);
			if (close(ma,mb))
				return collinear(a,b,c);
			double [] C = new double [4];
			C[0] = (ma * mb * (a[1] - c[1]) + mb * (a[0] + b[0]) - ma * (b[0] + c[0])) / (2*(mb - ma));
			C[1] = ((a[0] + b[0])/2 - C[0])/ma + (a[1] + b[1])/2;
			C[3] = dist(a,C);
			return C;
		}
	}
	
	double [] collinear (double [] a, double [] b, double [] c) {
		double [] C = circle(a,b);
		if (dist(b,c) > dist(a,b))
			C = circle(b,c);
		if (dist(a,c) > dist(b,c))
			C = circle(a,c);
		return C;
	}
	
	double [][] randomize(double [][] X) {
		SortedMap<Double, double []> M = new TreeMap<Double, double []>();
		for (double [] x : X)
			M.put(Math.random(), x);
		return M.values().toArray(new double[0][]);
	}
	
	////////////////////////////////////////////////////////////////////////////////////

	double dot(double [] A, double [] B) {
		double S = 0;
		for (int i = 0; i < A.length; ++i)
			S += A[i] * B[i];
		return S;
	}
	
	double norm (double [] A) {
		return Math.sqrt(dot(A,A));
	}
	
	boolean isZero(double [] X) {
		return close(dot(X,X),0);
	}
	
	double [] normalize(double [] X) {
		return scalar(1/norm(X),X);
	}
	
	double dist (double [] A, double [] B) {
		return norm(diff(A,B));
	}
	
	double [] scalar (double c, double [] A) {
		double [] cA = new double [A.length];
		for (int i = 0; i < A.length; ++i)
			cA[i] = c * A[i];
		return cA;
	}
	
	double [] sum (double [] A, double [] B) {
		double [] C = new double [A.length];
		for (int i = 0; i < A.length; ++i)
			C[i] = A[i] + B[i]; 
		return C;
	}

	double [] diff (double [] A, double [] B) {
		double [] C = new double [A.length];
		for (int i = 0; i < A.length; ++i)
			C[i] = A[i] - B[i]; 
		return C;
	}
	
	double [] cross (double [] A, double [] B) {
		double [] C = new double [A.length]; 
		// TODO - This is only 3-dimensional
		C[0] = A[1]*B[2] - B[1]*A[2];
		C[1] = A[2]*B[0] - B[2]*A[0];
		C[2] = A[0]*B[1] - B[0]*A[1];
		return C;
	}
	
	////////////////////////////////////////////////////////////////////////////////////

	private void print (Object o) {
		System.out.println(o);
	}
	
	public static void main(String[] args) throws Throwable {
		Scanner sc = new Scanner(System.in);
		new E(sc);
	}	
}