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
import static java.util.Arrays.*;
import static java.lang.Math.*;
import static java.math.BigInteger.*;
import java.util.*;
import java.math.*;
import java.io.*;

public class D implements Runnable
{
    String file = "input";
    
    void init() throws IOException
    {
        //input = new BufferedReader(new FileReader(file + ".in"));
        input = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(new BufferedOutputStream(System.out));
    }
    
    void solve() throws IOException
    {
        int runs = nextInt();
        while(runs-- > 0)
        {
            int[] xs = new int[3];
            int[] ys = new int[3];
            for(int i = 0; i < 3; i++)
            {
                xs[i] = nextInt();
                ys[i] = nextInt();
            }
    
            boolean ok = false;
            for(int i = 0; i < 3; i++)
            {
                if(can(xs[i], ys[i], xs[(i + 1) % 3], ys[(i + 1) % 3], xs[(i + 2) % 3], ys[(i + 2) % 3]))
                {
                    ok = true;
                    out.println("YES");
                    out.printf("%.9f %.9f %.9f %.9f %.9f %.9f %.9f %.9f\n", ax, ay, bx, by, cx, cy, dx, dy);
                    break;
                }
            }
            if(!ok) 
            {
                out.println("NO");
                out.println();
            }
        }
    }
    
    double ax, ay, bx, by, cx, cy, dx, dy;
    boolean can(int xm, int ym, int xn, int yn, int xp, int yp)
    {
        int xq = 2 * xm - xp;
        int yq = 2 * ym - yp;
        
        int[] c1 = line(xm, ym, xn, yn);
        double xa = (xm + xn) / 2.;
        double ya = (ym + yn) / 2.;
        
        int[] c2 = line(xm, ym, xq, yq);
        double xb = (xm + xq) / 2.;
        double yb = (ym + yq) / 2.;
        
        double[] b = intersection(-c1[1], c1[0], c1[1] * xa - c1[0] * ya, -c2[1], c2[0], c2[1] * xb - c2[0] * yb);
        if(b[0] == 0) return false;
        bx = b[1]; by = b[2];
        ax = 2 * xn - bx; ay = 2 * yn - by;
        cx = 2 * xm - bx; cy = 2 * ym - by;
        dx = 2 * xp - cx; dy = 2 * yp - cy;
        return check(new double[] {ax, bx, cx, dx}, new double[] {ay, by, cy, dy});
    }
    
    boolean check(double[] xs, double[] ys)
    {
        double cur = -1000000;
        for(int i = 0; i < 4; i++)
        {
            double x1 = xs[(i + 1) % 4] - xs[i];
            double y1 = ys[(i + 1) % 4] - ys[i];
            double x2 = xs[(i + 2) % 4] - xs[i];
            double y2 = ys[(i + 2) % 4] - ys[i];
            
            double mul = x1 * y2 - x2 * y1;
            if(cur == -1000000) cur = mul;
            else if(cur * mul <= 0) return false;
        }
        return true;
    }
    
    double EPS = 1e-12;
    double[] intersection(double a1, double b1, double c1, double a2, double b2, double c2)
    {
        double det = a1 * b2 - a2 * b1;
        if(abs(det) <= EPS) return new double[] {0, 0, 0};
        double x = (b1 * c2 - b2 * c1) / det;
        double y = (c1 * a2 - c2 * a1) / det;
        return new double[] {1, x, y};
    }
    
    
    int[] line(int x1, int y1, int x2, int y2)
    {
        int a = y1 - y2;
        int b = x2 - x1;
        int c = x1 * y2 - y2 * y1;
        return new int[] {a, b, c};
    }
    
    String next() throws IOException
    {
        while(st == null || !st.hasMoreTokens()) st = new StringTokenizer(input.readLine());
        return st.nextToken();
    }
    
    int nextInt() throws IOException
    {
        return Integer.parseInt(next());
    }
    
    long nextLong() throws IOException
    {
        return Long.parseLong(next());
    }
    
    double nextDouble() throws IOException
    {
        return Double.parseDouble(next());
    }
    
    void print(Object... o)
    {
        System.out.println(deepToString(o));
    }
    
    void gcj(Object o)
    {
        String s = String.valueOf(o);
        out.println("Case #" + test + ": " + s);
        System.out.println("Case #" + test + ": " + s);
    }
    
    BufferedReader input;
    PrintWriter out;
    StringTokenizer st;
    int test;
    
    public static void main(String[] args) throws IOException
    {
        new Thread(null, new D(), "", 1 << 20).start();
    }
    
    public void run()
    {
        try
        {
            init();
            solve();
            out.close();        
        }
        catch(Exception e)
        {
            e.printStackTrace();
            System.exit(1);
        }
    }
}