import numpy as np a, b, c, d, e, f = map(float, input().split()) a = np.array([[a, b], [d, e]]) b = np.array([c, f]) c = np.dot(b, np.linalg.inv(a)) print(c[0], c[1])