import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); long m = sc.nextInt(); int[] w = new int[n]; for (int i = 0; i < n; i++) { w[i] = sc.nextInt(); } sc.close(); long sum = 0; for (int i = 0; i < n; i++) { sum += w[i]; } // x = sum / m // w[i]m / sum StringBuilder sb = new StringBuilder(); for (int i = 0; i < n; i++) { long ans = w[i] * m / sum; sb.append(ans).append(' '); } sb.deleteCharAt(sb.length() - 1); System.out.println(sb.toString()); } }