Hermione and her chocolate love

Hermione loves to add different type of chocolates in her stock. In magical world, different types of chocolate just mean chocolates with different weights. Once, Hermione decided to place all the chocolates with same weight atop each other. Now she wants to know the height of the tower with maximum chocolates and also the number of such towers. As told earlier she’s weak in mathematics, can you help her in this task?

Input

First line of input contains a number T i.e. the number of test cases. First line of each test case contain a number N , which is the number of chocolates she has. Next line contains N numbers which are the weights of N chocolates.

Output

Your code should print T lines each having 2 numbers, first number should be the height of the tower with maximum chocolates and second number should be the number of towers.

Constraints-

1<=T<=100
1<=N<=10000
1<=weight of each chocolate<=30

Time limit-

2 second
Sample Input

2
3
4 4 2
5
1 3 3 1 2

Sample Output

2 2
2 3
Explanation

Here in the first test case we have 3 chocolates and their weights are 4,4 and 2� so we can make
two towers, one of height 2 and one of height 1.
Whereas in the second test case we can make 3 towers of height 2, 2 and 1.