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

  if a == 0
    y = c / b
    x = (f - e * y) / d
  elsif b == 0
    x = c / a
    y = (f - d * x) / e
  elsif d == 0
    y = f / e
    x = (c - b * y) / a
  elsif e == 0
    x = f / d
    y = (c - a * x) / b
  end

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

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