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