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
#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const double pi = 3.141592653589793238462643383;
struct point {
  double x, y;
};
int tests;
void change(point &A, double angle) {
  point B;
  B.x = A.x * cos(angle) - A.y * sin(angle);
  B.y = A.x * sin(angle) + A.y * cos(angle);
  A = B;
}
double getabs(double x) {
  if (x > 0) return x;
  return -x;
}
double det(double x1, double y1, double x2, double y2) {
  return x1 * y2 - y1 * x2;
}
bool cross(point A, point B, point C, point D, point &O) {
  double s1 = det(B.x - A.x, B.y - A.y, C.x - A.x, C.y - A.y);
  double s2 = det(B.x - A.x, B.y - A.y, D.x - A.x, D.y - A.y);
  if (getabs(s1 - s2) < eps) return 0;
  O.x = (C.x * s2 - D.x * s1) / (s2 - s1);
  O.y = (C.y * s2 - D.y * s1) / (s2 - s1);
  return 1;
}
bool calc(point A, point B, point C) {
  point D, E, F, G, H, O, P, p1, p2, p3, p4;
  D.x = 0.5 * (A.x + B.x);
  D.y = 0.5 * (A.y + B.y);
  E.x = B.x - A.x;
  E.y = B.y - A.y;
  F.x = 0.5 * (A.x + C.x);
  F.y = 0.5 * (A.y + C.y);
  G.x = C.x - A.x;
  G.y = C.y - A.y;
  change(E, pi / 2);
  change(G, pi / 2);
  E.x += D.x;
  E.y += D.y;
  G.x += F.x;
  G.y += F.y;
  if (!cross(D, E, F, G, O)) return 0;
  P.x = A.x + E.x - D.x;
  P.y = A.y + E.y - D.y;
  if (!cross(A, P, F, G, H)) return 0;
  p2.x = (A.x - H.x) * 2 + O.x;
  p2.y = (A.y - H.y) * 2 + O.y;
  p3.x = (H.x - O.x) * 2 + O.x;
  p3.y = (H.y - O.y) * 2 + O.y;
  p1.x = B.x + B.x - p2.x;
  p1.y = B.y + B.y - p2.y;
  p4.x = C.x + C.x - p3.x;
  p4.y = C.y + C.y - p3.y;
  double s1, s2, s3, s4;
  s1 = det(p2.x - p1.x, p2.y - p1.y, p3.x - p2.x, p3.y - p2.y);
  s2 = det(p3.x - p2.x, p3.y - p2.y, p4.x - p3.x, p4.y - p3.y);
  s3 = det(p4.x - p3.x, p4.y - p3.y, p1.x - p4.x, p1.y - p4.y);
  s4 = det(p1.x - p4.x, p1.y - p4.y, p2.x - p1.x, p2.y - p1.y);
  if (s1 < -eps && s2 < -eps && s3 < -eps && s4 < -eps ||
      s1 > eps && s2 > eps && s3 > eps && s4 > eps) {
    printf("YES\n");
    printf("%.9lf %.9lf %.9lf %.9lf ", p1.x, p1.y, p2.x, p2.y);
    printf("%.9lf %.9lf %.9lf %.9lf\n", p3.x, p3.y, p4.x, p4.y);
    return 1;
  }
  return 0;
}
int main() {
  scanf("%d", &tests);
  for (; tests--;) {
    point A, B, C;
    scanf("%lf%lf%lf%lf%lf%lf", &A.x, &A.y, &B.x, &B.y, &C.x, &C.y);
    if (calc(A, B, C)) continue;
    if (calc(B, A, C)) continue;
    if (calc(C, A, B)) continue;
    printf("NO\n\n");
  }
}
