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.util.*;
import java.io.*;
import java.lang.reflect.Array;
import java.math.*;
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		int t = in.nextInt();
		Task solver = new Task();
		while ((t --) > 0)
			solver.solve(in, out);
		out.close();
	}
}
class Task{
	public double sqr (double d) {
		return d * d;
	}
	class Point {
		public double x , y;
		Point () {}
		Point (double _x , double _y) {
			x = _x;
			y = _y;
		}
		public double dist (Point a) {
			return sqr (x - a.x) + sqr (y - a.y);
		}
		public Point sym (Point a) {
			return new Point (x * 2 - a.x , y * 2 - a.y);
		}
		public Point circumcenter (Point a , Point b) {
			double a1 = b.x - a.x , b1 = b.y - a.y , c1= (a1 * a1 + b1 * b1) / 2.0;
			double a2 = x - a.x , b2 = y - a.y , c2 = (a2 * a2 + b2 * b2) / 2.0;
			double d = a1 * b2 - a2 * b1;
			return new Point (a.x + (c1 * b2 - c2 * b1) / d , a.y + (a1 * c2 - a2 * c1) / d);
		}
	}
	double xmul (Point p , Point p1 , Point p2) {
		return (p.x - p1.x) * (p.y - p2.y) - (p.y - p1.y) * (p.x - p2.x);
	}
	boolean equal (double a , double b) {
		double d = a - b;
		if (d < 0) d = -d;
		if (d < (1e-10)) return true;
		return false;
	} 
	boolean check (Point a , Point b , Point c , Point d) {
		double t1 = xmul (a , b , c) , t2 = xmul (b , c , d) , t3= xmul (c , d , a) , t4 = xmul (d , a , b);
		if (t1 * t2 <= 1e-5 || t2 * t3 <= 1e-5 || t3 * t4 <= 1e-5 || t4 * t1 <= 1e-5) return false;
		return true;
	}
	boolean gao (Point k , Point l , Point m , PrintWriter cout) {
		if (xmul(k , l , m) == 0) return false;
		Point b =k.circumcenter(l.sym(m) , l) , a = k.sym(b) , c = l.sym(b) , d = m.sym(c);
		if (!equal (a.dist(b) , b.dist(c)) || !equal(b.dist(c) , c.dist(d))) return false;		
		if (!check (a , b , c , d)) return false;
		cout.println("YES");
		cout.println(a.x + " " + a.y + " " + b.x + " " + b.y + " " + c.x + " " + c.y + " " + d.x + " " + d.y);
		return true;
	}
	void solve (InputReader cin , PrintWriter cout) {
		Point k , l , m;
		double x , y;
		x = cin.nextDouble();y=cin.nextDouble();
		k = new Point (x , y);
		x = cin.nextDouble();y=cin.nextDouble();
		l = new Point (x , y);
		x = cin.nextDouble();y=cin.nextDouble();
		m = new Point (x , y);
		if (gao (k , l , m , cout)) return ;
		if (gao (k , m , l , cout)) return ;
		if (gao (l , k , m , cout)) return ;
		if (gao (l , m , k , cout)) return ;
		if (gao (m , k , l , cout)) return ;
		if (gao (m , l , k , cout)) return ;
		cout.println("NO");
	}
}
class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;
    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }
    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }
    public int nextInt() {
        return Integer.parseInt(next());
    }
    public long nextLong() {
    	return Long.parseLong(next());
    }
    public double nextDouble() {
    	return Double.parseDouble(next());
    }
    public BigInteger nextBigInteger() {
    	return new BigInteger(next());
    }
}