a, b, c, d,e,f = map(int, input().split()) A = b*d - a*e B = c*d - a*f C = a*e - b*d D = c*e - b*f y = B / A x = D / C print(x, y)