N,M = map(int,input().split()) W = list(map(int,input().split())) m = sum(W)/M print(*[int(W[i]/m) for i in range(N)])