STDIN.each_line do |line|
  a, b, c, d, e, f = line.split.map(&:to_f)
  det = a * e - b * d
  a1, b1, d1, e1 = e/det, -b/det, -d/det, a/det
  x, y = a1 * c + b1 * f, d1 * c + e1 * f
  printf "%.3f %.3f\n", x, y
end
