#coding: utf-8

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