#include<bits/stdc++.h>
using namespace std;
long long a,b,c,d,u,x,y,v,i;
ifstream fi("ttps.inp",ios::in);
ofstream fo("ttps.out",ios::out);
int toigian(long int a,long int b)
{
    for(i=2;i<=min(u,v)/2;i++)
    {
        while(u%i==0 && v%i==0)
        {u=u/i;
        v=v/i;}
    }
    return u;
    return v;
}
int main()
{
    fi>>a>>b>>c>>d;
    x=a*c;
    y=b*d;
    v=y;
    u=a*d+c*b;
    toigian(u,v);
    toigian(x,y);
    fo<<u<<"/"<<v<<endl<<x<<"/"<<y;

}
