import sys input = sys.stdin.readline from collections import * N, M = map(int, input().split()) W = list(map(int, input().split())) S = sum(W) if S==0: exit(print(*[0 for _ in range(N)])) ans = [M*Wi//S for Wi in W] print(*ans)