def abs(n)
    return (n > 0) ? n : -n
end

def sgn(n)
    return (n >= 0) ? "" : "-"
end

while line = gets
  a, b, c, d, e, f = line.split.map(&:to_f)
  x = ((c*e - b*f) / (a*e - b*d) * 1000).round(0)
  y = ((-c*d + a*f) / (a*e - b*d) * 1000).round(0)
  xs = sgn(x)
  ys = sgn(y)
  xa = abs(x)
  ya = abs(y)
  printf "%s%d.%03d %s%d.%03d\n", xs, xa / 1000, xa % 1000, ys, ya / 1000, ya % 1000
end