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

  if x == -0.000
    x = 0.000
  elsif
    y == -0.000
    y = 0.000
  end
  puts "#{x.round(3)} #{y.round(3)}
end