ARGF.each_line do |line|
  a, b, c, d, e, f = line.split.map(&:to_f)

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

  puts "#{'%1.3f' % x.round(3)} #{'%1.3f' % y.round(3)}"
end