while line = gets
  a, b, c, d, e, f = line.split.map(&:to_f)
  x = ((c*e - b*f) / (a*e - b*d) * 1000 + 1e-9).round(0)
  y = ((-c*d + a*f) / (a*e - b*d) * 1000 + 1e-9).round(0)
  printf "%d.%03d %d.%03d\n", x / 1000, x % 1000, y / 1000, y % 1000
end