|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|1 초||512 MB||40||10||8||47.059%|
Two of your friends Alpha and Beta are at A and B, two integer coordinates in 2D plane. You want to take their picture from another integer coordinate C fulfilling following conditions:
Don’t forget this is the era of digital photography where people don’t take only one snap. So you also need to find out K such C for each A and B from where you will take pictures.
A point P having coordinate (x,y) is called integer coordinate if both x and y are integers.
First line of the input contains number of test cases T (1 ≤ T ≤ 1000).
In following T lines, there are 5 integers: Ax, Ay, Bx, By, K. Coordinates of A and B are (Ax, Ay) and (Bx, By) respectively. A and B are distinct points. (-109 ≤ Ax, Ay, Bx, By ≤ 109, 0 ≤ sum of all K ≤ 20 000)
For each case print K lines each containing coordinate of C in: “Cx Cy” format. You may assume that there are at least K such C points. You may output the C points in any order, but these K points has to be distinct. Also all the Cx and Cy have to be between -1014 and 1014. For details of output format please consult the sample input output.
2 1 1 10 1 2 0 0 -10 -10 2
2 2 3 2 -1 0 -2 -1