#include #include #include using namespace std; long long gcd(long long x, long long y){ while(y > 0){ long long r = x % y; x = y; y = r; } return x; } int main(){ int n; cin >> n; vector a(n); for(int i = 0; i < n; i++) cin >> a[i]; int res = a[0]; for(int i = 1; i < n; i++){ res = gcd(res, a[i]); } string s = ""; for(int i = 0; i < n - 1; i++){s += to_string(a[i] / res) + ":";} s += to_string(a[n - 1] / res); cout << s << endl; }