## 程序设计在线评测（Online Judge）

2017年湖南科技大学大学生计算机程序设计竞赛初定于12月17日举行！有意参赛请加QQ群“湖科大程序设计校赛群（369699377）”

[提交][状态][讨论版]

## 题目描述

Today,here's a interesting problem.

Nowadays , optical fiber(光纤) is widely used in our life.Fiber Transmission (光纤传输) is the method to send  optical information (光信息)in a spacial pipe,as the figure shows.

The light goes into the pipe at the left end of the pipe,then after some times direct reflection,goes out the pipe at the right end , to send optical message.

Here's the problem, when the light goes into the pipe in a given direction ,which direction will it be when it goes out the pipe.

## 输入

The input contains several test cases. The first line of the input is a single integer T which is the number of test cases. T test cases follow. (T <= 100)

Each test case start with two positive integers D , L , which indicate the diameter of pile and the lenth of the pipe.(that is to say the pipe is between Y = D , Y = 0,X = 0,and X = L).next lines follow three integers,h,Vx,Vy.represents the position and direction in which the light goes into the pipe,the position is (0,h) and the direction is vector (Vx,Vy). All numbers in the input is in the range of  int32.(D>= h>= 0,D > 0,L > 0,Vx > 0,Vy != 0.we ensure that the light can goes into the pipe in the given direction and position.)

## 输出

Output two integers Vx2 , Vy2 represent the direction vector in which the light goes out the pipe.because of the various way to present that direction,we need you make Abs(Vx) == Abs(Vx2).

## 样例输入

3
2 10
2 1 -1
2 11
2 1 -1
2 10
1 1 -1


## 样例输出

1 -1
1 1
1 1


[提交][状态][讨论版]