import numpy as np def main(): a, b, c, d, e, f = map(int, input().split()) left = [[a, b], [d, e]] right = [c, f] ans = np.linalg.solve(left, right) print(*ans) if __name__ == "__main__": main()