import sys input = sys.stdin.readline from collections import * a, b, c, d, e, f = map(int, input().split()) x = (c*e-b*f)/(a*e-b*d) y = (c-a*x)/b print(x, y)