#include <stdio.h>
#include <cmath>

int main()
{
	int t, x, y, i, j, n, l, lmax, g, k;
	float ang[100], sin, cos, rast, res;
	freopen("hunter.in", "r", stdin);

	scanf("%d", &t);

	for(i=0; i<t; i++)
	{
		scanf("%d", &n);
		for(j=0; j<n; j++)
		{
			scanf("%d%d", &x, &y);
			rast = sqrt((float)x*x + (float)y*y); 
			sin = (float)y/rast;
			cos = (float)x/rast;
			ang[j] = acos(cos)*180;
			if(sin<0) ang[j] += 180 - ang[j];
		}
		g=1;
		while(g)
		{
			g=0;
			for(k=0; k<n-1; k++)
			{
				if(ang[k]<ang[k+1])
				{
					res = ang[k];
					ang[k] = ang[k+1];
					ang[k+1] = res;
					g=1;
				}
			}
		}
		l=1;
		lmax=1;
		for(j=1; j<n; j++)
		{
			if(ang[j]!=ang[j-1])
			{
				if(lmax<l) lmax=l;
				l=1;
			}
			else l++;
		}
		if(lmax<l) lmax=l;
		printf("%d\n", lmax);
	}
}