import java.util.Scanner; public class Main { public static void main(String[] args) { try (Scanner sc = new Scanner(System.in)) { int N = sc.nextInt(), M = sc.nextInt(); int[] W = new int[N]; for (int i = 0;i < N;++ i) W[i] = sc.nextInt(); int[] A = new int[N]; if (M != 0) { int gcd = 0; for (int i : W) gcd = gcd(gcd, i); int sum = 0; for (int i = 0;i < N;++ i) sum += W[i] /= gcd; for (int i = 0;i < N;++ i) A[i] = M / sum * W[i]; } System.out.print(A[0]); for (int i = 1;i < N;++ i) System.out.print(" " + A[i]); System.out.println(); } } static int gcd(int a, int b) { while(b != 0) if((a %= b) != 0) b %= a; else return b; return a; } }