while line = gets do
  a, b, c, d, e, f = line.chomp.split().map(&:to_f)
  g = b / e
  h = a / d
  puts "#{( ( c - g * f ) / ( a - g * d ) ).round( 3 )} #{( ( c - h * f ) / ( b - h * e ) ).round( 3 )}"
end