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