N,M = list(map(int,input().split())) W = list(map(int,input().split())) ball = sum(W) / M for i in range(N): print(int(W[i] / ball),end=' ') print()