When Cinder Maid came to the ball she wanted to dance only with the prince, and when midnight came she forgot to leave until the clock began to strike. She ran down the stairs, but the prince had ordered tar spread on the lower steps, and as she jumped to the foot of the stairs one of her shoes stuck fast and left a print behind. Just then the clock struck twelve, the golden coach with its horses and footmen vanished, her beautiful dress turned back into rags, and she had to run home.

A famous shoe-print
The prince could not find where his lady-love had gone, so he showed the shoe-print to the king and vowed to marry no one but its owner. The king ordered his algorist to gather every shoe in the kingdom and find which one fits the print. The print came from the maiden's right shoe, so the algorist collected the prints of all right shoes in the kingdom. Because many prints looked alike, he decided to write a program to decide the matches and set his apprentice to the task.
You are that apprentice. Given two shoe-prints, decide whether they are identical. Two shoe-prints are identical if one can be placed exactly on top of the other using only rotation and translation. Reflection is not allowed, since every print comes from a right shoe.
The first line contains the number of test cases T (1≤T≤20).
Each test case begins with a line containing an integer N (1≤N≤3000), the number of points on the boundary of each shoe-print. The next 2N lines each contain two floating-point numbers x and y (−100≤x,y≤100), the Cartesian coordinates of a point. The first N of these lines describe the first shoe-print and the following N lines describe the second shoe-print. Within each shoe-print the points are given in clockwise order. All numbers are separated by whitespace. No three consecutive points are collinear.
For each test case print exactly one line. Print y if the two shoe-prints are identical, otherwise print n.
When deciding whether two real numbers are equal, treat them as equal if their difference is less than 0.01.