def make_divisors(n): divisors = [] for i in range(1, int(n**0.5)+1): if n % i == 0: divisors.append(i) if i != n // i: divisors.append(n//i) divisors.sort() return divisors N = int(input()) l = list(map(int,input().split())) divi_l = make_divisors(l[0]) divi_l.reverse() for l_i in divi_l: ans = "" for ll_i in l: if ll_i % l_i == 0: ans += str(ll_i//l_i) +":" else: break else: break print(ans[:-1])