loop do
  line = gets
  break if line.nil?
  a,b,c,d,e,f = line.chomp.split(' ').map(&:to_f)
  y = ((c * d) - (f * a)) / ((b * d) - (e * a))
  x = (c - b * y) / a
  printf("%.3f %.3f\n", x.round(4), y.round(4))
end