Олимпиадный тренинг

Задача 38551. Parallelogram


At the geometry lesson, seventh-graders Vasya and Petya learned what a parallelogram is. At recess after the lesson, they began to play a game: Petya named the coordinates of four points in random order, and Vasya had to answer whether these points were the vertices of a parallelogram.

Vasya, to be honest, did not really understand the topic of parallelograms, and he needs a program that can correctly answer Petya's questions.

Recall that a parallelogram is a non-degenerate quadrilateral whose opposite sides are parallel.

Input
The first line of the input file contains an integer N (1 ≤ N ≤ 10) - the number of questions asked by Petya. Each of the next N lines contains a description of four points - four pairs of integers X and Y (−100 ≤ X ≤ 100, −100 &le ; Y ≤ 100) representing the coordinates of the point.

Imprint
For each question, determine if the given points form a parallelogram. If they form a parallelogram, then print the numbers of these points on one line separated by a space in the order of going around the parallelogram. You can start bypassing from any of the vertices. If they don't form a parallelogram, print the single number 0 on this line. The answer to each of the queries should be on a separate line.
 
Examples
# Input Output
1 3
1 1 4 2 3 0 2 3
1 1 5 2 2 3 3 0
0 0 5 1 6 3 1 2
1 3 2 4
0
1 2 3 4