while line = gets do
  a, b, c, d, e, f = line.chomp.split().map(&:to_f)
  g = b / e
  h = a / d
  printf( "%1.3f %1.3f", ( ( c - g * f ) / ( a - g * d ) ), ( ( c - h * f ) / ( b - h * e ) ) )
  puts
end