#include<bits/stdc++.h>
using namespace std;
int ucln(int a,int b)
{
	if(a<0)	a=a*-1;
	if(b<0)	b=b*-1;
	while(a!=b)
	{
		if(a>b)	a=a-b;
		if(b>a)	b=b-a;
	}
	return a;
}
/*int bcnn(int a,int b)
{
	a=m,b=n;
	while(a!=b)
	{
		if(a>b)	a=a-b;
		if(b>a)	b=b-a;
	}
	s=a*b/ucln(a,b);
	return s;
	
}*/
int main()
{
	ifstream f1("CAU1_14.inp");
	ofstream f2("CAU1_14.out");
	int tumoi,maumoi;
	int maukq,tukq;
	int tu1,mau1,tu2,mau2;
f1>>tu1>>mau1>>tu2>>mau2;
	maukq=mau1*mau2;
	tukq=tu1*mau2-tu2*mau1;
/*	if(tukq<0)
	{
		tukq=tukq*-1;
		tumoi=tukq/ucln(maukq,tukq);
		tumoi=-tumoi;
		f2<<tumoi/ucln(maukq,tukq)<<" "<<maukq/(maukq,tukq);
	}
	else if(maukq<0)
		{
		maukq=maukq*-1;
		maumoi=maukq/ucln(maukq,tukq);
		maumoi=-maumoi;
		f2<<tukq/ucln(maukq,tukq)<<" "<<maumoi/(maukq,tukq);
	}
	else
	*/
	f2<<tukq/ucln(maukq,tukq)<<" "<<maukq/ucln(maukq,tukq);
}
