while set = gets()
  if (set.nil? or set == "\n" or set == "\n\r") then break end
  a, b, c, d, e, f = set.split().map{|x| x.to_f}

  y = (d * c - a * f) / (d * b - a * e)
  x = (c - b * y) / a

  printf("%.3f %.3f", x, y)
end