while line = gets do
  a, b, c, d, e, f = line.split.map(&:to_i)
  ans1 = ((e*c-b*f)*1.0/(a*e-b*d)).round(3)
  ans2 = ((a*f-d*c)*1.0/(a*e-b*d)).round(3)
  ans1 = (ans1 == 0) ? 0.0 : ans1
  ans2 = (ans2 == 0) ? 0.0 : ans2
  printf("%.3f %.3f\n", ans1, ans2)
end