from collections import defaultdict,deque import sys,heapq,bisect,math,itertools,string,queue,datetime sys.setrecursionlimit(10**8) INF = float('inf') mod = 10**9+7 eps = 10**-7 def inpl(): return list(map(int, input().split())) def inpls(): return list(input().split()) N = int(input()) aa = inpl() def gcd(a,b): while b: a,b = b, a%b return a y = aa[0] for a in aa: y = gcd(y,a) print(y) ans = list(map(str,map(lambda x:x//y,aa))) print(':'.join(ans))