403139: GYM101028 E Teams

Memory Limit:64 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

E. Teamstime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard output

ACM-SCPC-2017 is approaching every university is trying to do its best in order to be the Champion, there are n universities, the ith of them has exactly ai contestants. No one knows what is the official number of contestants in each team yet, this year organizers are planing to minimize number of teams participating in the contest but they still want every contestant to participate, so they should select a number k so that each team will consist of exactly k contestant from the same university. Every contestant will belong to one team exactly, and number of these teams is as minimum as possible. Your job is to help the organizers in their task by writing a program that calculates two integers k, the number of contestants in each team, and m, the minimum number of teams will participate. 1 ≤ n ≤ 1000, 1 ≤ ai ≤ 106

Input

First line of input contains an integer T denotes number of test cases. Each test case contains two lines: the first line contains one integer n denotes number of universities, while the second line contains n space-separated integers the ith of them denotes number of contestants from the ith university.

Output

For each test case, print one line containing two integers: the first one is k, the size of each team, and the second one is m, the minimum number of teams from all universities according to the previous conditions.

ExampleInput
2
3
5 15 10
4
4 6 8 12
Output
5 6
2 15

加入题单

算法标签: