planegame

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.

Source: hackerearth | Difficulty: MEDIUM


Solutions: