// yukicoder: No.280 歯車の問題(1) // 2019.5.4 bal4u #include #if 1 #define gc() getchar_unlocked() #else #define gc() getchar() #endif long long in() // 非負整数の入力 { long long n = 0; int c = gc(); do n = 10 * n + (c & 0xf), c = gc(); while (c >= '0'); return n; } long long gcd(long long a, long long b) { long long r; while (b != 0) r = a % b, a = b, b = r; return a; } void norm(long long *a, long long *b) { long long g = gcd(*a, *b); if (g > 1) *a /= g, *b /= g; } int main() { int N; long long p, a, b, aa, bb; N = (int)in()-2; a = in(), b = p = in(), norm(&a, &b); while (N--) { aa = p, bb = p = in(), norm(&aa, &bb); a *= aa, b *= bb, norm(&a, &b); } printf("%lld/%lld\n", b, a); return 0; }