#include<fstream>
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);
long long ucln(long long a, long long b)
{
    while (b > 0)
    {
        long long r = a%b;
        a = b; b = r;
    }
    return a;
}
int main()
{
    fi>>a>>b>>c>>d;
    x=a*c;
    y=b*d;
    v=y;
    u=a*d+c*b;
    long long  tg1 = x,tg2 = u;
    x = x/ucln(x,y);
    y = y/ucln(tg1,y);
    u = u/ucln(u,v);
    v = v/ucln(tg2,v);
    fo<<u<<"/"<<v<<endl<<x<<"/"<<y;

}
