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;
class Point {
 public:
  double x, y;
  Point(double _x = 0, double _y = 0) {
    x = _x;
    y = _y;
  }
  Point operator+(const Point p) { return Point(x + p.x, y + p.y); }
  Point operator*(double u) { return Point(x * u, y * u); }
  Point operator-(const Point p) { return Point(x - p.x, y - p.y); }
  double len() { return sqrt(x * x + y * y); }
  double len2() { return x * x + y * y; }
  void read() { scanf("%lf%lf", &x, &y); }
  double cross(const Point &p) { return x * p.y - y * p.x; }
  double angle() { return atan2(y, x); }
  void print() { printf("%.9lf %.9lf ", x, y); }
};
bool left_turn(Point A, Point B, Point C) {
  return (B - A).cross(C - B) > 1e-9;
}
double get_angle(Point A, Point B, Point C) {
  double aa = (B - C).len2(), bb = (C - A).len2(), cc = (A - B).len2();
  double a = (B - C).len(), c = (A - B).len();
  return acos((aa + cc - bb) / (2.0 * a * c));
}
const double PI = acos(-1.0);
bool test(Point A, Point B, Point C) {
  double theta = get_angle(A, B, C);
  double L = 0.0, R = min(PI / 2.0, PI - theta);
  double ab = (B - A).len() / 2, bc = (C - B).len() / 2;
  for (int tick = 0; tick <= 100; tick++) {
    double M = (L + R) / 2.0;
    double W = PI - theta - M;
    if (ab * cos(W) < bc * cos(M))
      L = M;
    else
      R = M;
  }
  double alpha = (L + R) / 2.0, beta = PI - theta - alpha;
  double length = ab / cos(alpha);
  double t1 = (B - A).angle() + alpha;
  double t2 = (B - C).angle() - beta;
  {
    Point P, Q, R, S;
    P = A + Point(cos(t1) * length, sin(t1) * length);
    Q = C + Point(cos(t2) * length, sin(t2) * length);
    R = C - Point(cos(t2) * length, sin(t2) * length);
    S = A - Point(cos(t1) * length, sin(t1) * length);
    if (left_turn(R, Q, P) && left_turn(Q, P, S) && left_turn(P, S, R) &&
        left_turn(S, R, Q)) {
      puts("YES");
      P.print();
      Q.print();
      R.print();
      S.print();
      puts("");
      return true;
    }
  }
  return false;
}
void solve() {
  Point A, B, C;
  A.read();
  B.read();
  C.read();
  if (left_turn(A, B, C)) swap(B, C);
  if (test(A, B, C) || test(B, C, A) || test(C, A, B))
    ;
  else
    printf("NO\n\n");
}
int main(void) {
  int T;
  scanf("%d", &T);
  while (T--) solve();
  return 0;
}