#include <bits/stdc++.h>
using namespace std;
string s;
long long n,b,d,c,p,t,tu1,k,h,tu2,mau1,mau,f1,f2,mau2,f3,mauchung,tuchung;
long long ucln(long long a,long long b)
{
    long long 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;
    t=ucln(tu1,mau1);
    p=ucln(tu2,mau2);
    tu1=tu1/t;
    tu2=tu2/p;
    mau1=mau1/t;
    mau2=mau2/p;
    c=tu1*mau2+tu2*mau1;
    d=mau2*mau1;
    cout<<c/ucln(c,d)<<"/"<<d/ucln(c,d)<<endl;
    cout<<tu1*tu2/ucln(tu1*tu2,mau1*mau2)<<"/"<<mau1*mau2/ucln(tu1*tu2,mau1*mau2);
}

