#include #define rep(i, n) for (int i = 0; i < (n); ++i) using std::cin; using std::cout; using std::vector; using ll = long long; int main() { int n, m; cin >> n >> m; vector w(n); rep(i, n) cin >> w[i]; ll s = 0; rep(i, n) s += w[i]; vector a(n); rep(i, n) a[i] = w[i] * m / s; rep(i, n) cout << a[i] << ' '; return 0; }