#include #include using namespace std; long gcd(long x, long y) { long r; if (y > x) swap(x, y); while (y > 0) { r = x % y; x = y; y = r; } return x; } int main() { int N; long a[100], tmp[100]; cin >> N; for (int i = 0; i < N; ++i) { cin >> a[i]; tmp[i] = a[i]; } for (int i = 1; i < N; ++i) tmp[i] = gcd(tmp[i - 1], tmp[i]); for (int i = 0; i < N; ++i) { cout << a[i] / tmp[N - 1]; if (i != N - 1) cout << ":"; } }