N, M = gets.split(" ").map{|s| s.to_i} W = gets.split(" ").map{|s| s.to_i} if M == 0 then ball = 0 else ball = W.sum * 10**9 / M end ans = [] W.each{|w| ans << (ball == 0 ? 0 : w * 10**9 / ball) } puts ans.map{|i| i.to_s}.join(" ")