**1 人解决**，1 人已尝试。

**1 份提交通过**，共有 3 份提交。

**9.3** EMB 奖励。

**单点时限: **3.0 sec

**内存限制: **256 MB

Welcome to Ardenia. Ardenia is a mythical land, filled with adventure and danger, dwarves and dragons, mages and rouges. And puzzles. Lots of puzzles. Actually, the love for puzzles is the most important life ingredient of the inhabitants, and the only part they have in common.

This month, the people of Ardenia wonder what is the distance between two line segments in three dimensional space. (The distance between segments is defined as the minimum among distances between two points of different segments.) Actually, this problem had originally some motivation, but as nobody from Ardenia cares about motivations, neither should you.

The input contains several test cases. The first line of the input contains a positive integer , denoting the number of test cases. Then test cases follow.

For each test case, the first line of the input instance contains six space-separated integers .

Points and are the (different) endpoints of the first segment. The second line contains six integers in the same format, describing the second segment.

You should output a single line, for each test case, consisting of two co-prime integers and , such that is the squared distance between the given two segments.

Input

2 0 0 0 1 1 1 1 1 1 2 2 2 1 0 0 0 1 0 1 1 0 2 2 0

Output

0 1 1 2

**1 人解决**，1 人已尝试。

**1 份提交通过**，共有 3 份提交。

**9.3** EMB 奖励。

题目标签