N,M = map(int,input().split()) W = list(map(int,input().split())) print(*list(map(lambda x:x*M//sum(W),W)))