//TTPS
#include<fstream>
#include<cmath>
using namespace std;
int gcd(int a,int b)
{
	return(b==0)?a:gcd(b,a%b);
}
int tong1(int a,int b,int c,int d)
{
	int tong1=a*d-b*c;
	return tong1;
}
int main()
{
	ifstream f1("CAU1_14.INP");
	ofstream f2("CAU1_14.OUT");
	int a,b,c,d;
	f1>>a>>b>>c>>d;
	f1.close();
	int x=tong1(a,b,c,d)/gcd(tong1(a,b,c,d),b*d);
	if(b*d/gcd(tong1(a,b,c,d),b*d)) x=(0-1)*x;
	f2<<tong1(a,b,c,d)/gcd(tong1(a,b,c,d),b*d)<<' '<<b*d/gcd(tong1(a,b,c,d),b*d);
	//f2<<tong1(a,b,c,d)<<'/'<<b*d<<endl<<a*c<<'/'<<b*d;
	f2.close();
	return 0;
}
