#include #include #include #include #include #include #include #include #include #define repd(i,a,b) for (int i=(a);i<(b);i++) #define rep(i,n) repd(i,0,n) typedef long long ll; using namespace std; int inputValue(){ int a; cin >> a; return a; }; void inputArray(int * p, int a){ rep(i, a){ cin >> p[i]; } }; void inputVector(vector * p, int a){ rep(i, a){ int input; cin >> input; p -> push_back(input); } } template void output(T a, int precision) { if(precision > 0){ cout << setprecision(precision) << a << "\n"; } else{ cout << a << "\n"; } } // a < b ll gcd(ll a, ll b){ if (a > b) { swap(a, b); } if (b % a == 0) { return a; } else{ ll g = b % a; return gcd(g, a); } } // a < b ll lcm(ll a, ll b){ return (ll)a * (ll)b / (ll)gcd(a, b); } // first:分子 second:分母 // x = 6 / 5, y = 4 / 3: return: 12 / 1 pair smallest(pair x, pair y){ pair ret; ret.second = lcm(x.second, y.second); ret.first = lcm(x.first * (ret.second / x.second), y.first * (ret.second / y.second)); ll g = gcd(ret.first, ret.second); ret.first /= g; ret.second /= g; return ret; } int main(int argc, const char * argv[]) { // source code vector T(3); rep(i, 3){ T[i] = (ll)inputValue(); } sort(T.begin(), T.end()); vector > M(4); M[0] = smallest(make_pair(T[0] * T[1], T[0] + T[1]), make_pair(T[0] * T[2], T[0] + T[2])); M[1] = smallest(make_pair(T[0] * T[1], T[0] + T[1]), make_pair(T[0] * T[2], T[2] - T[0])); M[2] = smallest(make_pair(T[0] * T[1], T[1] - T[0]), make_pair(T[0] * T[2], T[0] + T[2])); M[3] = smallest(make_pair(T[0] * T[1], T[1] - T[0]), make_pair(T[0] * T[2], T[2] - T[0])); vector D(4); int ii = 0; double min = (double)M[0].first / (double)M[0].second; rep(i, 4){ D[i] = (double)M[i].first / (double)M[i].second; if (min > D[i]) { min = D[i]; ii = i; } } cout << M[ii].first << "/" << M[ii].second << endl; return 0; }