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