ADAPICK  Ada and Cucumber
Ada the Ladybug works as farmer. Its season of cucumbers and she wants to harvest them. There lies many cucumbers all around her house. She wants to choose a direction and follow it until all cucumbers in that direction are collected.
Lets consider Ada's house as centerpiece of whole universe, lying on [0,0]. The cucumbers are defined as lines on plane. No cucumber goes through Ada's house (and no cucumber touches it).
How many cucumbers can Ada pick in one go if she chooses the best direction possible?
Input
The first line contains an integer T, the number of testcases.
Each testcase begins with an integer 1 ≤ N ≤ 10^{5}
Afterward N lines follow, with four integers 10^{6} ≤ x_{1},y_{1},x_{2},y_{2} ≤ 10^{6}, the beginning and end of each cucumber. Each cucumber has positive length.
Sum of all N over all testcases won't exceed 10^{6}
Even though cucumber will not go through house, they might touch, intersect or overlap other cucumbers!
Output
For each testcase print one integer  the maximal number of cucumbers which could be picked if Ada chooses a direction and picks every cucumber lying in it.
Example Input
5 4 2 1 1 4 2 1 1 3 3 2 0 5 2 2 5 1 3 2 2 2 2 2 2 2 2 3 3 6 3 3 2 1 3 4 3 1 5 5 2 2 2 2 6 1 5 6 5 3 3 5 3 2 5 5 5 1 6 5 6 5 1 5 5 6 6 6 11 3 1 3 4 3 4 2 4 1 5 1 6 6
Example Output
3 2 1 4 2
Possibly harvested cucumbers
1 2 3 1 3 1 2 3 4 6 2 3
hide comments
kauai68:
20200425 14:08:09
Angular sweep with integer arithmetic works. I've got WA for a long time, because my abort criterium of the angular sweep was wrong. The following test case with solution 6 helped me to solve the problem:


:D:
20191008 23:26:49
Small hint: this problem can and should be solved without using floating point operations. Only integer arithmetic. Otherwise precision issues will probably result in WA. 

narek:
20180809 16:08:43
Have been trying for two days on this one.. I can't find any test case where my solution gives a wrong answer :(


the193thdoctor:
20180424 08:42:14
I keped WA,can sombody help me? 
Added by:  Morass 
Date:  20170212 
Time limit:  2.5s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All 