#include #include using namespace std; int GCD(int a, int b){ if(b == 0) return a; return GCD(b, a % b); } int calcGCD(int a, int b){ if(a < b) swap(a, b); return GCD(a, b); } int calcLCM2(int a, int b){ if(a < b) swap(a, b); return a / GCD(a, b) * b; } int calcLCM3(int a, int b, int c){ return calcLCM2(calcLCM2(a, b), c); } int main(){ int t1, t2, t3; int v1, v2, v3; cin >> t1 >> t2 >> t3; int numer = calcLCM3(t1, t2, t3); v1 = numer / t1 + numer / t2; v2 = numer / t2 + numer / t3; v3 = numer / t3 + numer / t1; int denom = calcGCD(v1, v2); denom = max(denom, calcGCD(v2, v3)); denom = max(denom, calcGCD(v3, v1)); cout << numer << "/" << denom << endl; }