import math def yukicoder1175_SimultaneousEquations(a, b, c, d, e, f): lc = a * d / math.gcd(a, d) b *= lc / a c *= lc / a e *= lc / d f *= lc / d a = lc d = lc g = b - e h = c - f y = h / g x = (c - (b * y)) / a print(x, y) a, b, c, d, e, f = map(int, open(0).read().split()) yukicoder1175_SimultaneousEquations(a, b, c, d, e, f)