function getgcd(a, b) while(0 < a and 0 < b) do if(a < b) then b = b % a else a = a % b end end return math.max(a, b) end n = io.read("*n") t = {} for i = 1, n do table.insert(t, io.read("*n")) end gcd = t[1] for i = 2, n do gcd = getgcd(gcd, t[i]) end for i = 1, n do if(1 < i) then io.write(":") end t[i] = t[i] / gcd io.write(string.format("%d", t[i])) end io.write("\n")