There are N points on an XY plane. In one turn, you can select a set of collinear points on the plane and remove them. Your goal is to remove all the points in the least number of turns. Given the coordinates of the points, calculate two things:

The minimum number of turns (T) needed to remove all the points.
The number of ways to to remove them in T turns. Two ways are considered different if any point is removed in a different turn.

Input Format

The first line contains the number of test cases T. T test cases follow. Each test case contains N on the first line, followed by N lines giving the coordinates of the points.

Output Format

Output T lines, one for each test case, containing the least number of turns needed to remove all points and the number of ways to do so. As the answers can be large, output them modulo 1000000007.

Constraints

1 ≤ T ≤ 50
1 ≤ N ≤ 16
0 ≤ xi,yi ≤ 100
No two points will have the same coordinates.

SAMPLE INPUT
2
3
0 0
0 1
1 0
4
3 4
3 5
3 6
5 5

SAMPLE OUTPUT
2 6
2 8

Explanation

For the 1st input, Let the points be labelled p1,p2,p3. These are the ways to remove them (first turn's points, followed by second turn's points):

a. 1) p1,p2 2) p3
b. 1) p1,p3 2) p2
c. 1) p2,p3 2) p1
d. 1) p3 2) p1,p2
e. 1) p2 2) p1,p3
f. 1) p1 2) p3,p2
def constdr1(Points) :
	Droites = []	
	i = 0
	j = i + 1
	while j < len(Points) :
		S = True
		for D in Droites :
			if (Points[D[1]][0]-Points[D[0]][0])*(Points[j][1]-Points[i][1])-(Points[D[1]][1]-Points[D[0]][1])*(Points[j][0]-Points[i][0])== 0 :
				S=False
				if not (j in D) :
					D.append(j)
					break
		if S :
			Droites.append([i,j])
		j+=1
	return Droites

def sousparties(D) :
	N = len(D)
	D2 = D +[]
	if N==0 :
		return [[]]
	else :
		i =D2[0]
		D2.pop(0)
		Sol = sousparties(D2)
		Sol2 = []		
		for P in Sol :
			Sol2.append([i]+P)
		return Sol2 + Sol

def factorielle(n) :
	if n == 0 :
		return 1
	else :
		return n*factorielle(n-1)
								
def main(Points, d,nbp) :
	if len(Points)< 3 :
		nb= nbp + len(Points)
		k = (nb+1)/2
		if k > d :
			return [d,0]
		else :
			return [k,factorielle(2*k)/2**k]
	elif d == 0 :
		#print "plop2"
		return [0,0]
	else :
		Droites = constdr1(Points)
		i = 0
		sol = 0
		while i< len(Droites) :
			Droites[i].pop(0)
			for P in sousparties(Droites[i]) :
				if len(P) < 2 :
					continue
				j=1
				Points2 = []
				while j < len(Points) :
					if not j in P :
						Points2.append(Points[j])
					j+=1			
				A = main(Points2,d-1,nbp)
				if A[0]<d-1:
					d = A[0] +1
					sol = d*A[1]
				else :
					sol +=d*A[1]
			i+=1
		A = main(Points[1:],d, nbp+1)
		if A[0]<d:
			d = A[0]
			sol = A[1]
		else:
			sol +=A[1]
		#print sol
		return [d,int(sol %1000000007)]

T = map(eval, raw_input().split())					
i = 0
while i < T[0] :
	M = map(eval, raw_input().split())
	N= M[0]	
	j = 0
	points = []
	while j < N:
		X, Y = map(eval, raw_input().split())
		points += [[X,Y]]
		j+=1
	Sol = main(points, (N+1)/2,0)
	print Sol[0], Sol[1]
	i+=1