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>
const double eps = 1e-8;
struct P {
  double x, y;
  P(double x = 0, double y = 0) : x(x), y(y) {}
} a, b, c, p[4];
P operator+(P a, P b) { return P(a.x + b.x, a.y + b.y); }
P operator-(P a, P b) { return P(a.x - b.x, a.y - b.y); }
P operator*(P a, double b) { return P(a.x * b, a.y * b); }
P operator~(P a) { return P(-a.y, a.x); }
double operator*(P a, P b) { return a.x * b.y - b.x * a.y; }
inline int sgn(double x) { return x < -eps ? -1 : x > eps; }
inline void read(P &a) { scanf("%lf%lf", &a.x, &a.y); }
inline void write(P &a) { printf("%.9lf %.9lf ", a.x, a.y); }
inline double det(P a, P b, P c) {
  return (b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x);
}
inline P rev(P a, P b) { return P(b.x * 2 - a.x, b.y * 2 - a.y); }
inline P Intersect(P a, P b, P c, P d) {
  double s1 = det(a, c, b), s2 = det(a, b, d);
  return P((c.x * s2 + d.x * s1) / (s1 + s2),
           (c.y * s2 + d.y * s1) / (s1 + s2));
}
inline P cet(P a, P b, P c) {
  P x = (a + b) * 0.5, y = (b + c) * 0.5;
  return Intersect(x, x + ~(b - a), y, y + ~(c - b));
}
inline bool ok(P &a, P &b, P &c) {
  if (!sgn(det(rev(a, b), b, c))) return false;
  p[0] = cet(rev(a, b), b, c);
  p[1] = rev(p[0], b);
  p[2] = rev(p[1], a);
  p[3] = rev(p[0], c);
  for (int i = 0; i < 4; i++)
    if (sgn((p[(i + 1) % 4] - p[i]) * (p[(i + 2) % 4] - p[(i + 1) % 4])) < 1)
      return 0;
  printf("YES\n");
  for (int i = 0; i < 4; i++) write(p[i]);
  puts("");
  return 1;
}
int T;
int main() {
  scanf("%d", &T);
  while (T--) {
    read(a);
    read(b);
    read(c);
    if (!(ok(a, b, c) || ok(a, c, b) || ok(b, a, c) || ok(b, c, a) ||
          ok(c, a, b) || ok(c, b, a)))
      printf("NO\n\n");
  }
  return 0;
}