#include #include #include #include #include #include #include #include #include #include #include #include #include #include #define INF 1000000000 #define rep(i,a,b) for (int i=(a);i<(b);i++) #define rev(i,a,b) for (int i=(a)-1;i>=b;i--) using namespace std; typedef long long ll; typedef pair pii; typedef queue qi; typedef vector vi; typedef vector vs; int dx[4] = { 0, 1, 0, -1 }; int dy[4] = { 1, 0, -1, 0 }; int main(){ cin.tie(0); ios::sync_with_stdio(false); int a,b,c; cin >> a >> b >> c; int tmpa = a, tmpb = b, tmpc = c; vi n; int w = 2; while(1) { int a1 = tmpa%w; int b1 = tmpb%w; int c1 = tmpc%w; if(a1 == 0 && b1==0 && c1==0) { n.push_back(w); tmpa /= w; tmpb /= w; tmpc /= w; w = 2; } else if(a1 == 0 && b1==0) { n.push_back(w); tmpa /= w; tmpb /= w; w = 2; } else if(a1 == 0 && c1==0) { n.push_back(w); tmpa /= w; tmpc /= w; w = 2; } else if(b1 == 0 && c1==0) { n.push_back(w); tmpc /= w; tmpb /= w; w = 2; } else { w++; } if(w > tmpa && w> tmpb && w > tmpc) break; } int lcm = 1; rep(i,0,n.size()) lcm *= n[i]; lcm *= tmpa; lcm *= tmpb; lcm *= tmpc; double aa = (double)lcm/a, bb = (double)lcm/b, cc = (double)lcm/c; int num = 2, ans2 = 1; while(aa / num > 1) { double tmp1 = aa / num, tmp2 = bb / num, tmp3 = cc / num; tmp1 -= (int)tmp1; tmp2 -= (int)tmp2; tmp3 -= (int)tmp3; tmp1 = floor(tmp1*10000) / 10000; tmp2 = floor(tmp2*10000) / 10000; tmp3 = floor(tmp3*10000) / 10000; // printf("%.20f %.20f %.20f\n", tmp1, tmp2, tmp3); // cout << tmp1 << " " << tmp2 << " " << tmp3 << endl; if(tmp1 == tmp2 && tmp1 == tmp3) ans2 = num; num++; } cout << lcm << "/" << ans2 << endl; return 0; }