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