
while STDIN.gets do
  a,b,c,d,e,f = $_.split(" ").map(&:to_i)

  //
  ratio = d.to_f/a
  aa = a * ratio
  bb = b * ratio
  cc = c * ratio

  coe_y = bb - e
  right = cc - f
  y = right / coe_y

  //
  coe_x = a
  right = c - b*y
  x = right / coe_x

  puts "%.3f %.3f" % [x,y]

end