n = gets
until n.nil?
    nn = n.split(" ").map{|k| k.to_f }
    a = nn[0]
    b = nn[1]
    c = nn[2]
    d = nn[3]
    e = nn[4]
    f = nn[5]
    x = 0
    y = 0
    if c*e - b*f == 0
        x = 0
    else
        x = ((c*e - b*f) / (a*e - b*d)).round(3)
    end
    if c*d - a*f == 0
        y = 0
    else
        y = ((c*d - a*f) / (b*d - a*e)).round(3)
    end
    
    puts "#{'%.3f' % x} #{'%.3f' % y}"
    n = gets
end

