func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MOD = 1e6 + 3;   const int INFI = 1e9 * 2;   const long long LINFI = 1e17;   const double pi = acos(-1.0);   const double s2 = sqrt(2.0);   const int N = 222;   const int M = 11;   const int move[8][2] = {1, 0, -1, 0, 0, 1, 0, -1, 1, 1, 1, -1, -1, 1, -1, -1};   int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }   int main() {     int a, b, c, d, p, q, m, x, y;     while (scanf( %d%d%d%d , &a, &b, &c, &d) != EOF) {       m = c * d / gcd(c, d);       a *= m;       b *= m;       x = a / c;       y = b / d;       if (x >= y) {         q = a;         p = a - y * c;       } else {         q = b;         p = b - x * d;       }       m = gcd(p, q);       q /= m;       p /= m;       printf( %d/%d n , p, q);     }     return 0;   }   