import Foundation let n = Int(readLine()!) var a = readLine()!.split(separator: " ").map{Int($0)!}.sorted() var x = [1] for i in 2...Int(sqrt(Double(a[0])) + 1){ if a[0] % i == 0{ x += [i,a[0] / i] } } x.sort() for i in a{ for j in x{ if i % j != 0{ x.remove(at: x.firstIndex(of: j)!) } } } print(x) a = a.map{$0 / x.max()!} print(a.map{String($0)}.joined(separator: ":"))