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-9;
struct Pot {
  double x, y;
  Pot operator+(const Pot &a) const { return (Pot){x + a.x, y + a.y}; }
  Pot operator-(const Pot &a) const { return (Pot){x - a.x, y - a.y}; }
  Pot operator*(const double &a) const { return (Pot){x * a, y * a}; }
  Pot operator/(const double &a) const { return (Pot){x / a, y / a}; }
  Pot dc(Pot a) { return a * 2 - (*this); }
  Pot obv() { return (Pot){-y, x}; }
  Pot mid(Pot a) { return ((*this) + a) / 2; }
  bool operator==(const Pot &a) const { return x == a.x && y == a.y; }
  double len() { return sqrt(x * x + y * y); }
  void Pr() { printf("%.10f %.10f\n", x, y); }
} A[3];
double dot(Pot a, Pot b) { return a.x * b.x + a.y * b.y; }
double det(Pot a, Pot b) { return a.x * b.y - a.y * b.x; }
struct LINE {
  Pot a, b;
} bc, bd;
bool px(LINE a, LINE b) { return fabs(det((a.b - a.a), (b.b - b.a))) < eps; }
Pot jiao(LINE a, LINE b) {
  double s1 = det(b.b - a.a, b.a - a.a), s2 = det(b.a - a.b, b.b - a.b);
  return a.a + (a.b - a.a) * s1 / (s1 + s2);
}
bool bigger(double a, double b) { return a - b > eps; }
bool smaller(double a, double b) { return a - b < -eps; }
int id[3];
bool Check(Pot a, Pot b, Pot c) { return fabs(det(a - b, a - c)) < eps; }
bool check(Pot a, Pot b, Pot c) {
  Pot d = a.dc(b);
  if (d == c || d == b) return false;
  Pot dbm = d.mid(b), cbm = c.mid(b);
  bc = (LINE){cbm, cbm + (b - c).obv()};
  bd = (LINE){dbm, dbm + (b - d).obv()};
  if (px(bc, bd)) return false;
  Pot A = jiao(bc, bd), B, C, D;
  B = A.dc(b), C = B.dc(a), D = A.dc(c);
  if (Check(A, B, C)) return false;
  if (Check(B, C, D)) return false;
  if (Check(C, D, A)) return false;
  if (Check(D, A, B)) return false;
  bc = (LINE){A, C};
  bd = (LINE){B, D};
  if (px(bc, bd)) return false;
  Pot aa = jiao(bc, bd);
  if (bigger(A.x, C.x)) swap(A, C);
  if (smaller(aa.x, A.x) || smaller(C.x, aa.x)) return false;
  if (bigger(A.y, C.y)) swap(A, C);
  if (smaller(aa.y, A.y) || smaller(C.y, aa.y)) return false;
  if (bigger(B.x, D.x)) swap(B, D);
  if (smaller(aa.x, B.x) || smaller(D.x, aa.x)) return false;
  if (bigger(B.y, D.y)) swap(B, D);
  if (smaller(aa.y, B.y) || smaller(D.y, aa.y)) return false;
  puts("YES");
  printf("%.10f %.10f %.10f %.10f %.10f %.10f %.10f %.10f\n", A.x, A.y, B.x,
         B.y, C.x, C.y, D.x, D.y);
  return true;
}
void solve() {
  scanf("%lf %lf %lf %lf %lf %lf", &A[0].x, &A[0].y, &A[1].x, &A[1].y, &A[2].x,
        &A[2].y);
  for (int i = 0; i < 3; i++)
    for (int j = i + 1; j < 3; j++)
      if (A[i] == A[j]) {
        puts("NO");
        puts("");
        return;
      }
  id[0] = 0, id[1] = 1, id[2] = 2;
  do {
    if (check(A[id[0]], A[id[1]], A[id[2]])) return;
  } while (next_permutation(id, id + 3));
  puts("NO");
  puts("");
}
int main() {
  int cas;
  scanf("%d", &cas);
  while (cas--) solve();
  return 0;
}
