while line = gets
  a, b, c, d, e, f = line.split.map(&:to_f)
  boo = a * d
  if boo == 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)
  elsif boo == a
    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)
  else
    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
end