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