import math n=int(input()) e =list(map(int,input().split())) def f(num): for i in range(n): e[i] //=num bl2 = 1#2で約比可能か bli = 1#3以上の奇数で約比可能か #0番目の要素を約分 divs = [] a = e[0] while bl2 or bli : if bl2: if a%2 ==0: a //=2 divs.append(2) continue else: bl2 =0 for i in range(3,int(math.sqrt(a))+1,2): if a%i ==0: a //=i divs.append(i) continue else: bli =0 divs.append(a) while len(divs) >0: bl =1 d = divs.pop(0) for i in range(1,n): if e[i] % d >=1: bl =0 if bl: f(d) print(":".join(map(str,e)))