$stdin.each_line do |line|
  a , b , c , d , e , f = line.split.map{|i| i.to_f}
  x = (c*e - f*b)/(a*e - d*b).round(4)
  x = (x == 0) ? 0 : x
  y = (a*f - d*c)/(a*e - d*b).round(4)
  y = (y == 0) ? 0 : y
  printf("%.3f %.3f\n" , x , y)
end