P17785 [HackerEarth] Jerry is playing a rather plain computer game. The game is played in the 2D Cartesian plane. At the beginning of the game there are some points in the plane.
普及
题目描述

Jerry is playing a rather plain computer game. The game is played in the 2D Cartesian plane. At the beginning of the game there are some points in the plane.
The objective of the game is to make a single shot that will eliminate as many of these points as possible. When Jerry takes the shot, it will eliminate all points that (at that moment) lie on the x-axis and also all points that lie on the y-axis.
Before Jerry takes the shot, he may perform a sequence of zero or more actions. Each action can be of either of the following two types:
He may translate all points by any vector (the same for all points). In other words, he may shift all points in the same direction by the same distance.
He may rotate all points around the origin by any angle (the same for all points).
Note that it is possible that after an action some points will have non-integer coordinates.
Find and return the maximum number of points Jerry can eliminate in one shot.
First line contains number of test cases-
In every test first line will contain n(number of points)
the second line will contain n space separated characters denoting x coordinate of the point.
the third line will contain n space separated characters denoting y coordinate of the point.

Constraints-
1 ≤ T ≤ 20
1 ≤ n ≤ 50
-1,000,000 ≤ x[i] , y[i] ≤ 1,000,000

SAMPLE INPUT
2
2
0 5
0 5
5
0 -1 1 1 -1
0 -1 -1 1 1

SAMPLE OUTPUT
2
5

Explanation

First Test Case-
At the beginning of the game there are two points: one at (0, 0) and the other at (5, 5). Jerry can shift both points by 5 in the negative y direction. This will move the points to (0, -5) and (5, 0). Then Jerry can take the shot and eliminate both points. Therefore, the answer is 2.

输入格式

见题面

输出格式

见题面

样例输入
19 15 5 8 9 1000 754 123 256 148 36 254 -12 -18 -254 -36 -1800 0 0 -12 1 2 3 4 5 -810 -1 2541 -2 658 -952 -12000 17 0 0 0 1 1 1 -1 -1 -1 2 4 6 8 10 12 14 16 -1 0 1 -1 0 1 -1 0 1 1 2 3 4 5 6 7 8 4 -3 2 -1 1 0 1 3 6 4 0 2 3 5 2 4 0 2 4 0 0 1 -1 1 -1 0 0 1 0 0 2 -1 1 2 2 4 0 0 1000000 -1000000 0 1000000 1 0 6 0 2 2 3 3 5 2 4 5 -1 0 2 3 -1 0 4 2 0 10000 10 -1000000 -1 999998 1 -1001 1000000 -999999 999999 0 0 999999 1 1000000 -1 -999 1000000 0 0 -999999 999999 3 0 10 5 0 0 1 4 1 -1 1 -1 -1 -1 1 1 10 1 1 1 1 1 1 1 1 1 1 1 2 3 4 5 6 7 8 9 10 5 -1000000 0 1000000 0 1000000 -1000000 0 0 1000000 1000000 10 126 119 126 120 138 124 122 124 122 111 -717 -718 -725 -725 -701 -720 -722 -722 -720 -712 4 -1 -1 -2 -2 2 1 2 1 4 1 2 2 100 2 5 100 1000000 4 -1 1 1 -1 -1 -1 1 1
样例输出
50 3 3 3 3 21 50 50 4 3 3 3 3 5 6