while input = gets
  a,b,c,d,e,f = input.chomp.split(" ").map(&:to_f)
  l = d/a

  m = (l*c-f)
  n = (l*b-e)
  #print l
  #print m
  #print n
  
  if a != 0
    y = m/n
    x = (c-b*y)/a
  else a == 0
    y = c/b if b != 0
    x = (f-e*(c/b))/d
  end
  printf("%.3f %.3f\n", x, y)
end


