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
  if ((a != 0) && (d != 0))
    v = w / x
    an = c - b * v
    ans = an / a
  else
    if (a == 0)
      v = c / b
      an = f - e * v
      ans = an / d
    else
      v = f / e
      an = c - b * v
      ans = an / a
    end
  end
  printf("%.3f %.3f\n", ans, v)
end