N,M=map(int,input().split()) W=list(map(int,input().split())) weight=sum(W)/M A=[int(x/weight) for x in W] print(*A)