while line = gets
    a, b, c, d, e, f = line.chomp.split.map(&:to_f)
    detA = a * e - b * d
    detA1 = c * e - b * f
    detA2 = a * f - c * d
    printf("%.3f %.3f\n", detA1 / detA + 0, detA2 / detA + 0)
end