while line = gets
  a, b, c, d, e, f = line.split.map(&:to_f)
  boo = a * d
  bb = (boo / a) * b
  cc = (boo / a) * c
  ee = (boo / d) * e
  ff = (boo / d) * f
  x = bb - ee
  w = cc - ff
  v = w / x
  an = c - b * v
  ans = an / a
  printf("%.3f %.3f\n", ans, v)
end