a,b=map(int,input().split()) l=[int(i)for i in input().split()] n=sum(l) m=b//n s=[] for i in l: s+=[str(i*m)] print(" ".join(s))