n, m = map(int, input().split()) W = list(map(int, input().split())) tot = sum(W) print(*(w * m // tot for w in W))