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-5;
const double epss = 1e-10;
struct Point {
  double x, y;
  void scan() { scanf("%lf%lf", &x, &y); }
  void print() { printf("%.10lf %.10lf ", x + epss, y + epss); }
} p[3];
struct Line {
  double k, b;
};
Line make_line(Point a, Point b) {
  Point c = (Point){(a.x + b.x) / 2, (a.y + b.y) / 2};
  double k = -1 * (b.x - a.x) / (b.y - a.y);
  return (Line){k, c.y - k * c.x};
}
void make_point(Line l1, Line l2, Point a0, Point &a1, Point &a2) {
  a2.x = (2 * a0.y - 2 * l1.k * a0.x - l1.b - l2.b) / (l2.k - l1.k);
  a2.y = l2.k * a2.x + l2.b;
  a1.x = 2 * a0.x - a2.x;
  a1.y = l1.k * a1.x + l1.b;
}
double cross(Point a, Point b, Point c) {
  double x1 = b.x - a.x, x2 = c.x - a.x, y1 = b.y - a.y, y2 = c.y - a.y;
  return x1 * y2 - x2 * y1;
}
bool solve(Point a, Point b, Point c) {
  if (cross(a, c, b) < eps) swap(b, c);
  Line l1 = make_line(a, b);
  Line l2 = make_line(a, c);
  if (((l1.k - l2.k) > 0 ? (l1.k - l2.k) : -(l1.k - l2.k)) < eps) return 0;
  Point u, v, w, z;
  make_point(l1, l2, a, u, v);
  w = (Point){c.x * 2 - v.x, c.y * 2 - v.y};
  z = (Point){b.x * 2 - u.x, b.y * 2 - u.y};
  if (cross(v, w, u) < eps) return 0;
  if (cross(w, z, v) < eps) return 0;
  if (cross(z, u, w) < eps) return 0;
  if (cross(u, v, z) < eps) return 0;
  printf("YES\n");
  w.print();
  z.print();
  u.print();
  v.print();
  puts("");
  return 1;
}
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    p[0].scan();
    p[1].scan();
    p[2].scan();
    p[1].x += epss;
    p[1].y += epss;
    p[0].x -= epss;
    p[0].y -= epss;
    if (solve(p[0], p[1], p[2])) continue;
    if (solve(p[1], p[0], p[2])) continue;
    if (solve(p[2], p[0], p[1])) continue;
    printf("NO\n\n");
  }
}