A thief made his way to a shop.

As usual he has his lucky knapsack with him. The knapsack can contain k objects. There are n kinds of products in the shop and an infinite number of products of each kind. The cost of one product of kind i is ai.

The thief is greedy, so he will take exactly k products (it's possible for some kinds to take several products of that kind).

Find all the possible total costs of products the thief can nick into his knapsack.

Input

The first line contains two integers n and k (1 ≤ n, k ≤ 1000) — the number of kinds of products and the number of products the thief will take.

The second line contains n integers ai (1 ≤ ai ≤ 1000) — the costs of products for kinds from 1 to n.

Output

Print the only line with all the possible total costs of stolen products, separated by a space. The numbers should be printed in the ascending order.

Examples

Input

3 2
1 2 3


Output

2 3 4 5 6


Input

5 5
1 1 1 1 1


Output

5


Input

3 3
3 5 11


Output

9 11 13 15 17 19 21 25 27 33
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Scanner;



public class NTTSolution {
	private static final int MAX_A = 1000;

	
	static class NumberTheoreticTransform {
		
		final static long MOD = 10 * (1<<24) + 1;
		final static long root = pow(3, 10);
		final static long root_1 = inverse(root);
		final static long root_pw = 1<<24;
		
		
		static long inverse(long n) {
			return pow(n, MOD - 2); 
		}
		
		private static long pow(long n, long exp) {
			return BigInteger.valueOf(n).modPow(
					BigInteger.valueOf(exp),
					BigInteger.valueOf(MOD)).longValue();
		}

		static void ntt(long[] a, boolean invert) {
//			System.err.println(a.length);
//			System.err.println(root_1);
//			for (int i = 0; i < root_pw; ++i) {
//				if (BigInteger.valueOf(root).modPow(
//						BigInteger.valueOf(i),
//						BigInteger.valueOf(MOD)).longValue() == 1) {
//					System.err.println("bad: " + i);
//				}
//				
//			}
//			System.err.println("!!! " + BigInteger.valueOf(root).modPow(
//					BigInteger.valueOf(root_pw),
//					BigInteger.valueOf(MOD)));
			
			int n = a.length;
			int s = 0;
			for (int i = 1; i < n; i++) {
				int bit = n >>> 1;
				while (s >= bit) {
					s -= bit;
					bit >>>= 1;
				}
				s += bit;
				if (i < s) {
					long b = a[i];
					a[i] = a[s];
					a[s] = b;
				}
			}
			int l = 2;
			while (l <= n) {
				long wl = invert ? root_1 : root;
				int k = l;
				while (k < root_pw) {
					wl = (wl * wl) % MOD;
					k <<= 1;
				}
				int l_2 = l / 2;
				for (int i = 0; i < n; i += l) {
					int w = 1;
					for (int j = i; j < i + l_2; j++) {
						long u = a[j];
						long v = (a[j + l_2] * w) % MOD;
						a[j] = u + v < MOD ? u + v : u + v - MOD;
						a[j + l_2] = u - v >= 0 ? u - v : u - v + MOD;
						w = (int) ((w * wl) % MOD);
					}
				}
				l <<= 1;
			}
			if (invert) {
				long nrev = inverse(n);
				for (int i = 0; i < n; i++) {
					a[i] = (a[i] * nrev) % MOD;
				}
			}
		}

	  public static long[] multiply(long[] a, long[] b) {
	    int resultSize = Integer.highestOneBit(Math.max(a.length, b.length) - 1) << 2;
	    resultSize = Math.max(resultSize, 1);
	    
	    long[] aReal = new long[resultSize];
	    long[] bReal = new long[resultSize];
	    for (int i = 0; i < a.length; i++)
	      aReal[i] = a[i];
	    for (int i = 0; i < b.length; i++)
	      bReal[i] = b[i];
	    ntt(aReal, false);
	    if (a == b) {
	      System.arraycopy(aReal, 0, bReal, 0, aReal.length);
	    } else {
	      ntt(bReal, false);
	    }
	    for (int i = 0; i < resultSize; i++) {
	      long real = (aReal[i] * bReal[i]) % MOD;
	      aReal[i] = real;
	    }
	    ntt(aReal, true);
	    long[] result = new long[resultSize];
	    for (int i = 0; i < resultSize; i++)
	      result[i] = aReal[i];
	    return result;
	  }
	}


	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int k = in.nextInt();
		int[] a = new int[n];
		for (int i = 0; i < n; ++i) {
			a[i] = in.nextInt();
		}
		in.close();
		int[] ans = solveFFT(a, k);
		PrintWriter out = new PrintWriter(System.out);
		for (int i = 0; i < ans.length; ++i) {
			if (i > 0) out.print(" ");
			out.print(ans[i]);
		}
		out.println();
		out.close();
	}

	static long[] binPow(long[] a, int k) {
		long[] ans = new long[1];
		ans[0] = 1;
		while (k > 0) {
			if (k % 2 == 1) {
				ans = multiplyBoolean(ans, a);
			}
			a = multiplyBoolean(a, a);
			k /= 2;
		}
		return ans;
	}
	
	private static long[] multiplyBoolean(long[] a, long[] b) {
		for (int i = 0; i < a.length; ++i) {
			a[i] = Math.min(a[i], 1);
		}
		for (int i = 0; i < b.length; ++i) {
			b[i] = Math.min(b[i], 1);
		}
		return NumberTheoreticTransform.multiply(a, b);
	}

	private static int[] solveFFT(int[] a, int k) {
		long[] start = new long[MAX_A + 1];
		for (int i : a) {
			start[i] = 1;
		}
		
		long[] can = binPow(start, k);
		
		int cnt = 0;
		for (int i = 0; i < can.length; ++i) {
			if (can[i] > 0) {
				++cnt;
			}
		}
		int[] ans = new int[cnt];
		cnt = 0;
		for (int i = 0; i < can.length; ++i) {
			if (can[i] > 0) {
				ans[cnt++] = i;
			}
		}
		return ans;
	}
}
