Because all the problems are so hard these days, this is a very simple problem. Suppose you are given co-ordinates of two points A & B in 2D plane, an angle M and a stick of length L. One end of the stick is in point B and it creates M degree angle with the line AB in anti clockwise direction. It means that if one end of the stick is point B and another end is point C then angle B is equal to M and Length of BC is equal to L . You have to tell the co-ordinates of the other end point of the stick, that is the co-ordinates of point C .

Input

First line will contains T, the number of test cases . Then for each of case, there will be line containing 6 integers Ax, Ay, Bx, By, M and L .

1<=T<=1000

0<=Ax,Ay,Bx,By<=10000

0<=M<=180

1<=L<=10000

Ax<=Bx

Ay<=By

Output

For each case, print two numbers X and Y , the co-ordinates of the other end point of the stick rounded to the closest integer number in a line. See sample test case for better understanding.