Program ex2;
function nod(n,m:longword);
begin
while n<>m do
if n>m then
n:=n-m
else
m:=m-n;
nod:=m;
end;
var a,b,c,d,f,g:longword;
e:longint;
begin
read(a,b,c,d);
e:=a*d-b*c;
if e=0 then
write('0')
else
begin
f:=b*d;
g:=nod(abs(e),f);
e:=e div g;
f:=f div g;
write(e,' ',f);
end;
end.