use std::cmp::{min, max}; fn gcd(a: usize, b: usize) -> usize { if a % b == 0 { return b; } gcd(b, a % b) } fn main() { let mut n = String::new(); std::io::stdin().read_line(&mut n).ok(); let n: usize = n.trim().parse().unwrap(); let mut a = String::new(); std::io::stdin().read_line(&mut a).ok(); let a: Vec = a.trim().split_whitespace().map(|s| s.parse().unwrap()).collect(); let mut gcdval: usize = a[0]; for i in 1..n { gcdval = gcd(max(gcdval, a[i]), min(gcdval, a[i])); } println!("{}", a.iter().map(|i| i / gcdval).map(|i| i.to_string()).collect::>().join(":")); }