#coding: utf-8
STDOUT.sync = true

while data = STDIN.gets do
  num = data.split().map!(&:to_i)
  y = (num[2] * num[3] - num[0] * num[5]) / (num[1] * num[3] - num[0] * num[4])
  x = (num[2] - num[1] * y) / num[0]
  printf("%.3f %.3f\n", x, y)
end