x1 = null

while line = gets do
  a, b, c, d, e, f = line.split.map(&:to_i)
  ans1 = (c - a * x1) / b
  x = (f - e * ans1) / d
  y = (c - a * x) / b
  printf("%.3f %.3f\n", x.round/1000.0, y.round/1000.0)
end