import math A, B = map(int, input().split()) C, D = map(int, input().split()) prod = abs(A * D - B * C) gcd = abs(math.gcd(A, B, C, D)) print(gcd, 0 if gcd == 0 else prod // gcd)