#include<bits/stdc++.h>
using namespace std;
int ucln(int x, int y)
{
    int r;
    while (y!=0)
    {
        r=x%y;
        x=y;
        y=r;
    }
    return x;
}
int bcnn(int x, int y)
{
    int result=(x*y)/ucln(x,y);
    return result;
}
int main()
{
    ifstream fi("ttps.inp");
    ofstream fo("ttps.out");
    int a,b,c,d;
    fi>>a>>b>>c>>d;
    int ms=bcnn(b,d);
    int ts=a*(ms/b)+c*(ms/d);
    fo<<ts/ucln(ts,ms)<<'/'<<ms/ucln(ts,ms)<<endl;
    ts=a*c;
    ms=b*d;
    fo<<ts/ucln(ts,ms)<<'/'<<ms/ucln(ts,ms);
}
