题目描述
Lucy and Lily are twins. Today is their birthday, so Mother buys them a birthday cake. There are 2N cherries on the cake, where 1N50. Mother wants to cut the cake into two halves with a single straight-line cut through the center so each twin gets both the same amount of cake and the same number of cherries. Can you help her?
The cake has a radius of 100 and its center is located at (0, 0). The coordinates of each cherry are given by two integers (x, y). You must give the line in the form Ax + By = 0, where both A and B are integers in [- 500, 500]. Cherries are not allowed to lie on the cutline. There is at least one solution for each data set.
输入
The input file contains several test cases. The first line of each case contains the integer N. This is followed by 2N lines, where each line contains the (x, y) location of a cherry with one space between them. The input is ends with N = 0.
输出
For each test case, print a line containing A and B with a space between them. If there are many solutions, any one will suffice.
样例输入
2
-20 20
-30 20
-10 -50
10 -5
0
样例输出
0 1
参考代码
暂无
解析
暂无