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