#include <bits/stdc++.h>
using namespace std;
string s;
int n,b,d,c,p,tu1,k,h,tu2,mau1,mau2,a[10000000],f1,f2,f3,mauchung,tuchung;
int ucln(int a,int b)
{
    int r;
    while (b!=0)
    {
        r=a%b;
        a=b;
        b=r;
    }
    return a;
}
int main()
{
    freopen("TTPS.inp","r",stdin);
    freopen("TTPS.out","w",stdout);
    cin>>tu1>>mau1>>tu2>>mau2;
    tu1=tu1/ucln(tu1,mau1);
    tu2=tu2/ucln(tu2,mau2);
    mau1=mau1/ucln(tu1,mau1);
    mau2=mau2/ucln(tu2,mau2);
    mauchung=mau1/ucln(mau1,mau2)*mau2;
    tuchung=mau2/ucln(mau1,mau2)*tu1+mau1/ucln(mau1,mau2)*tu2;
    f1=ucln(tuchung,mauchung);
    cout<<tuchung/f1<<"/"<<mauchung/f1<<endl;
    f2=ucln(tu1*tu2,mau1*mau2);
    cout<<tu1*tu2/f2<<"/"<<mau1*mau2/f2;
}
