n,m = map(int,input().split()) w = list(map(int,input().split())) ans = [] stan = sum(w)/m for i in range(n): ans.append(int(w[i]/stan)) print(*ans)