import sys; input = sys.stdin.buffer.readline sys.setrecursionlimit(10**7) from collections import defaultdict con = 10 ** 9 + 7; INF = float("inf") def getlist(): return list(map(int, input().split())) import numpy as np #処理内容 def main(): a, b, c, d, e, f = getlist() val = a * e - b * d ans = np.array([[e, -b], [-d, a]]) @ np.array([[c], [f]]) ans = ans / val print(ans[0][0], ans[1][0]) if __name__ == '__main__': main()