n,m = map(int,input().split()) w = list(map(int,input().split())) all_ball = sum(w) ball = all_ball/m a = [] for i in range(n): ai = round(w[i]/ball) print(ai,end=' ')