import math a,b=map(int,input().split()) c,d=map(int,input().split()) det=abs(a*d-b*c) g=math.gcd(math.gcd(abs(a),abs(b)),math.gcd(abs(c),abs(d))) print(min(g,det//g),max(g,det//g))