#include <bits/stdc++.h>
using namespace std;
int ucln(int a,int b)
{
	if (a == 0 || b == 0){
        return a + b;
    }
    while (a != b){
        if (a > b)
		{
            a= a-b;
        }
		else
		{
            b=b-a;
        }
    }
    return a;
}
int bcnn(int x,int y)
{
	int i = 1;
	while ( (x*i)% y != 0)
	{
		i++;
	}
	return x*i;
}
int main()
{
    ifstream f1("ttps.inp");
    ofstream f2("ttps.out");
    int a,b,x,y;
    f1>>a>>b>>x>>y;
    int c,d;
    c=bcnn(b,y)/b;
    d=bcnn(b,y)/y;
    f2<<a*c+b*d<<"/"<<bcnn(b,y)<<endl;
    int i=ucln(a*x,b*y);
    f2<<a*x/i<<"/"<<b*y/i;
}
