HCF-LCM
Difficulty: Hard

**Input Format**

First line contains the number of test cases, $T$. Next $2*T$ lines follow, each containing  total number of elements $N$ in the first line and $N$ spaced positive integers, $a_i$ in the second line.

**Output Format**

Output $T$ lines each line in the format:
	
    H:L
    
where $H$ is the highest common factor of the elements and $L$ is the lcm of the elements modulo 500.

**Constraints**

$1 \le T \le 10^5$

$1 \le N \le 10^6 $

$1 \le a_i \le 10^9$

**Sample Input**

    1
    3
    4 12 20
    
**Sample Output**

	4:60

Input Format:

Output Format:

Sample Input:

Sample Output:

Python 3 starter code:


Reference solution (Python):
    from fractions import *
    def lcm(x,y):
        return (x*y)/gcd(x,y)
    t=input()
    for i in range(t):
        n=input()
        a=map(int,raw_input().split())
        print str(reduce(gcd,a)) + ':' + str(reduce(lcm,a)%500)