mod = 1000000007 eps = 10**-9 def main(): import sys input = sys.stdin.readline N, M = map(int, input().split()) W = list(map(int, input().split())) S = sum(W) ans = [w * M // S for w in W] print(*ans) if __name__ == '__main__': main()