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