/* -*- coding: utf-8 -*- * * 736.cc: No.736 約比 - yukicoder */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; /* constant */ const int MAX_N = 100; /* typedef */ typedef long long ll; /* global variables */ ll as[MAX_N]; /* subroutines */ ll gcd(ll m, ll n) { // m >0, n > 0 if (m < n) swap(m, n); while (n > 0) { ll r = m % n; m = n; n = r; } return m; } /* main */ int main() { int n; scanf("%d", &n); for (int i = 0; i < n; i++) scanf("%lld", &as[i]); ll r = as[0]; for (int i = 1; i < n && r > 1; i++) r = gcd(r, as[i]); for (int i = 0; i < n; i++) { if (i) putchar(':'); printf("%lld", as[i] / r); } putchar('\n'); return 0; }