#include #include #include #include #include #include #include using namespace std; typedef long long LL; LL gcd(LL a, LL b){ if(a > b) swap(a, b); if(a == 0) return b; return gcd(b % a, a); } LL lcm(LL a, LL b){ return a * b / gcd(a, b); } int main(){ LL t1, t2, t3; cin >> t1 >> t2 >> t3; LL m = lcm(t1, lcm(t2, t3)); LL c1 = m / t1; LL c2 = m / t2; LL c3 = m / t3; LL d = 1; for(LL i = 1; i <= 2000000; i++){ LL r1 = c1 - c1 / i * i; LL r2 = c2 - c2 / i * i; LL r3 = c3 - c3 / i * i; if((r1 == r2 || r1 == i-r2) && (r1 == r3 || r1 == i-r3)){ d = i; } } if(t1 == t2 && t2 == t3){ cout << "0/1" << endl; } LL d2 = gcd(m, d); cout << m/d2 << "/" << d/d2 << endl; return 0; }