#include <fstream>
#include <math.h>

using namespace std;

long long GCD(long long a, long long b)
{
	return (b == 0) ? a : GCD(b, a % b);
}

int main()
{
	ifstream input("CAU1_14.inp");
	ofstream output("CAU1_14.out");

	long long a, b, c, d;
	input >> a >> b >> c >> d;
	long long TS = a * d - b * c;
	long long MS = b * d;
	long long gcd = abs(GCD(TS, MS));
	TS /= gcd;
	MS /= gcd;
	output << TS << ' ' << MS;
	input.close();
	output.close();
	return 0;
}