import math from sys import stdin n, m, *w = map(int, stdin.read().split()) wgcd = w[0] for i in range(1,n): wgcd = math.gcd(wgcd,w[i]) sum = 0 for i in range(n): w[i] = w[i] // wgcd sum += w[i] ans = [0 for i in range(n)] for i in range(n): ans[i] = m // sum * w[i] L=[str(i) for i in ans] L=' '.join(L) print(L)