N = int(input().strip()) a = sorted([int(i) for i in input().strip().split(' ')]) num = 2 while True: if sum([i % num for i in a]) != 0: break else: a = [i // num for i in a] num = 3 while True: if num > a[0]: break if sum([i % num for i in a]) != 0: num += 2 else: a = [i // num for i in a] print(':'.join([str(i) for i in a]))