Problem: You're given the centers of three equal sides of a strictly convex tetragon. Your task is to restore the initial tetragon.

Input

The first input line contains one number T — amount of tests (1 ≤ T ≤ 5·104). Each of the following T lines contains numbers x1, y1, x2, y2, x3, y3 — coordinates of different points that are the centers of three equal sides (non-negative integer numbers, not exceeding 10).

Output

For each test output two lines. If the required tetragon exists, output in the first line YES, in the second line — four pairs of numbers — coordinates of the polygon's vertices in clockwise or counter-clockwise order. Don't forget, please, that the tetragon should be strictly convex, i.e. no 3 of its points lie on one line. Output numbers with 9 characters after a decimal point.

If the required tetragon doen't exist, output NO in the first line, and leave the second line empty.

Examples

Input

3
1 1 2 2 3 3
0 1 1 0 2 2
9 3 7 9 9 8


Output

NO

YES
3.5 1.5 0.5 2.5 -0.5 -0.5 2.5 0.5
NO

Solution (in JAVA):

Solution:
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.StreamTokenizer;


public class D {

	static StreamTokenizer st;
	static double x11,y11,x22,y22,x33,y33,x44,y44;
	public static void main(String[] args) throws IOException{
		st = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
		PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		int t = nextInt();
		for (int i = 1; i <= t; i++) {
			int x1 = nextInt();
			int y1 = nextInt();
			int x2 = nextInt();
			int y2 = nextInt();
			int x3 = nextInt();
			int y3 = nextInt();
			if (solve(x1, y1, x2, y2, x3, y3) || solve(x2, y2, x1, y1, x3, y3) || solve(x3, y3, x1, y1, x2, y2)) {
				pw.println("YES");
				pw.println(x11+" "+y11+" "+x22+" "+y22+" "+x33+" "+y33+" "+x44+" "+y44);
			}
			else {
				pw.println("NO");
				pw.println();
			}
		}
		pw.close();
	}
	
	private static boolean solve(int x1, int y1, int x2, int y2, int x3, int y3) {
		int x4 = 2*x1-x3, y4 = 2*y1-y3;
		double A1 = y1-y2, B1 = x2-x1, C1 = A1*(y1+y2)/2.0-B1*(x1+x2)/2.0;
		double t = A1;
		A1 = B1;
		B1 = -t;
		double A2 = y4-y2, B2 = x2-x4, C2 = A2*(y4+y2)/2.0-B2*(x4+x2)/2.0;
		t = A2;
		A2 = B2;
		B2 = -t;
		if (A1*B2-A2*B1==0)
			return false;
		double D = det(A1, A2, B1, B2);
		double Dx = det(-C1, -C2, B1, B2);
		double Dy = det(A1, A2, -C1, -C2);
		double x = 1.0*Dx/D, y = 1.0*Dy/D;
		x11 = 2*x2-x;
		y11 = 2*y2-y;
		x22 = x;
		y22 = y;
		x33 = 2*x1-x;
		y33 = 2*y1-y;
		x44 = 2*x3-x33;
		y44 = 2*y3-y33;
		double alfa1 = angle(x11, y11, x22, y22, x44, y44);
		double alfa2 = angle(x22, y22, x11, y11, x33, y33);
		double alfa3 = angle(x33, y33, x22, y22, x44, y44);
		double alfa4 = angle(x44, y44, x33, y33, x11, y11);
		if (Math.abs(alfa1+alfa2+alfa3+alfa4-2*Math.PI) < 1e-8 && notPI(alfa1) && notPI(alfa2) && notPI(alfa3) && notPI(alfa4)) {
			if (noZero(alfa1) && noZero(alfa2) && noZero(alfa3) && noZero(alfa4)) {
				return true;
			}
			return false;
		}
		return false;
	}

	private static boolean noZero(double alfa1) {
		return Math.abs(alfa1) > 1e-8;
	}

	private static boolean notPI(double alfa1) {
		return Math.abs(alfa1-Math.PI) > 1e-8;
	}

	private static double angle(double x1, double y1, double x2,
			double y2, double x3, double y3) {
		return Math.acos(((x2-x1)*(x3-x1)+(y2-y1)*(y3-y1))/(dis(x1, y1, x2, y2)*dis(x1, y1, x3, y3)));
	}

	private static double dis(double x1, double y1, double x2, double y2) {
		return Math.sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));
	}

	private static double det(double a1, double a2, double b1, double b2) {
		return a1*b2-a2*b1;
	}

	private static int nextInt() throws IOException{
		st.nextToken();
		return (int) st.nval;
	}

}