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