#include <bits/stdc++.h>
using namespace std;
long ucln(long a,long b)
{
    while(a!=b){
        if(a>b){
            a=a-b;
        }
        else b=b-a;
    }
    return a;
}
int main()
{
    ifstream f1("TTPS.inp");
    ofstream f2("TTPS.out");
    long a,b,c,d;
    f1>>a>>b>>c>>d;
    long ts1=a*d+c*b;
    long ms1=b*d;
    long d1=ucln(ts1,ms1);
    f2<<ts1/d1<<"/"<<ms1/d1<<endl;
    long ts2=a*c;
    long ms2=b*d;
    long d2=ucln(ts2,ms2);
    f2<<ts2/d2<<"/"<<ms2/d2;
    f1.close();
    f2.close();
    return 0;
}
