using System; using System.Linq;//リストの使用 using System.Collections.Generic; using System.Text;//テキストの高速出力に必要 class Program { static void Main() { long n = long.Parse(Console.ReadLine());//long.Parseはstringをlongに変換。 long[] nums = Array.ConvertAll(Console.ReadLine().Split(' '),long.Parse); long gcd = nums[0]; for(int i = 1; i < n; i++) gcd = Gcd(gcd, nums[i]); for(int i = 0; i < n; i++) nums[i] /= gcd; Console.WriteLine(string.Join(":", nums)); } static long Gcd(long a, long b) {//引数a,bの最大公約数を返す if (a < b) return Gcd(b, a);//入れ替え while (b != 0) { long changeTo = a % b; a = b; b = changeTo; } return a; } }