import sys input = sys.stdin.readline N,M=map(int,input().split()) W=list(map(int,input().split())) x=M/sum(W) W2=[round(w*x) for w in W] print(*W2)