#include <fstream>
using namespace std;
ifstream f1("ttps.inp");
ofstream f2("ttps.out");
long ucln(long a,long b)
{
	while (a != b)
	{
		if (a > b) a = a - b;
		else b = b - a;
	}
	return a;
}
long a,b,c,d;
int main()
{
    f1 >> a >> b >> c >> d;
    long tongtu = a*d + b*c;
    f2 << tongtu/ucln(tongtu,b*d) << "/" << b*d/ucln(tongtu,b*d) << endl;
    long tichtu = a*c,tichmau = b*d;
    f2 << tichtu/ucln(tichtu,tichmau) << "/" << tichmau/ucln(tichtu,tichmau);
    return 0;
}
