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

Solution:
#include <bits/stdc++.h>
using namespace std;
const double Eps = 1e-6;
int sgn(double a, double b = 0) {
  a -= b;
  return (a > Eps) - (a < -Eps);
}
const double Pi = 4 * atan(1);
struct Point {
  double x, y;
  Point operator-(Point p) { return {x - p.x, y - p.y}; }
  Point operator+(Point p) { return {x + p.x, y + p.y}; }
  Point operator/(double d) { return {x / d, y / d}; }
  Point operator*(double d) { return {x * d, y * d}; }
  Point rot(double d) {
    double rx = x * cos(d) - y * sin(d);
    double ry = x * sin(d) + y * cos(d);
    return {rx, ry};
  }
  double cross(Point p) { return x * p.y - y * p.x; }
};
double xmul(Point a, Point b, Point c) { return (b - a).cross(c - a); }
Point inter(Point p1, Point p2, Point q1, Point q2) {
  double u = xmul(p1, p2, q1);
  double v = xmul(p2, p1, q2);
  double rx = (q1.x * v + q2.x * u) / (v + u);
  double ry = (q1.y * v + q2.y * u) / (v + u);
  return {rx, ry};
}
Point circum(Point p, Point q, Point r) {
  Point mpq = (p + q) / 2;
  Point dpq = (q - p).rot(Pi / 2);
  Point mqr = (q + r) / 2;
  Point dqr = (r - q).rot(Pi / 2);
  return inter(mpq, mpq + dpq, mqr, mqr + dqr);
}
Point A, B, C, D;
bool solve(Point p, Point q, Point r) {
  if (sgn(xmul(p, q, r)) == 0) return false;
  Point sr = p * 2 - r;
  C = circum(sr, p, q);
  D = q * 2 - C;
  B = p * 2 - C;
  A = r * 2 - B;
  if (sgn(xmul(A, B, D)) > 0 && sgn(xmul(B, C, A)) > 0 &&
      sgn(xmul(C, D, B)) > 0 && sgn(xmul(D, A, C)) > 0)
    return true;
  return false;
}
int main() {
  int kase;
  scanf("%d", &kase);
  while (kase--) {
    Point p, q, r;
    scanf("%lf%lf%lf%lf%lf%lf", &p.x, &p.y, &q.x, &q.y, &r.x, &r.y);
    if (sgn(xmul(p, q, r)) <= 0) swap(q, r);
    if (solve(p, q, r) || solve(q, r, p) || solve(r, p, q)) {
      printf("YES\n");
      printf("%.9f %.9f ", A.x, A.y);
      printf("%.9f %.9f ", B.x, B.y);
      printf("%.9f %.9f ", C.x, C.y);
      printf("%.9f %.9f\n", D.x, D.y);
    } else
      printf("NO\n\n");
  }
  return 0;
}