while data = gets
  a = data.chomp.split
  6.times do |i|
    a[i] = a[i].to_f
  end
  d = a[0]*a[4]-a[1]*a[3]
  x = ((a[2]*a[4]-a[1]*a[5])*1000).round/d/1000
  y = ((-a[2]*a[3]+a[0]*a[5])*1000).round/d/1000 
  x = 0 if -0.001 < x && x < 0.001
  y = 0 if -0.001 < y && y < 0.001
  printf("%.3f %.3f\n", x, y) 
end