lines=readlines.to_a
lines.each do |line|
  a,b,c,d,e,f=line.split.map(&:to_i)

  if a != d
    a_dush = a * d
    b *= d
    c *= d
    d *= a
    e *= a
    f *= a
    a = a_dush
  end
  b_dush = b - e
  c_dush = c - f
  y = c_dush / b_dush.to_f
  x = (c - b * y) / a.to_f
  x = sprintf("%.3f", x.round(4))
  y = sprintf("%.3f", y.round(4))

  if x == "-0.000"
    x = "0.000"
  elsif
    y == "-0.000"
    y = "0.000"
  end
  puts "#{x} #{y}"
end