#include #include #include using namespace std; #define RREP(i,s,e) for (i = s; i >= e; i--) #define rrep(i,n) RREP(i,(int)(n)-1,0) #define REP(i,s,e) for (i = s; i <= e; i++) #define rep(i,n) REP(i,0,(int)(n)-1) #define INF 100000000 typedef long long ll; ll gcd(ll a, ll b) { return b == 0 ? a : gcd(b,a%b); } ll lcm(ll a, ll b) { return a * b / gcd(a,b); } int main() { ll a, b, c; ll cm1, cm2, cm, dv1, dv2; cin >> a >> b >> c; cm1 = lcm(a,b); cm2 = lcm(b,c); dv1 = abs(cm1 / a - cm1 / b); dv2 = abs(cm2 / b - cm2 / c); cm = lcm(cm1,cm2); cout << cm << "/"; cout << gcd(cm/cm1*dv1,cm/cm2*dv2) << endl; return 0; }