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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.AbstractCollection;
import java.util.PriorityQueue;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        E632 solver = new E632();
        solver.solve(1, in, out);
        out.close();
    }

    static class E632 {
        int N;
        int K;
        long[] prices;

        long[] modmult(long[] a, long[] b) {
            long[] sol = FFT.multiply(a, b);
            long[] res = new long[Math.min(sol.length, 1000001)];
            for (int i = 0; i < res.length; i++)
                if (sol[i] == 0) res[i] = 0;
                else res[i] = 1;
            return res;
        }

        long[] pow(long[] arr, int exp) {
            if (exp == 1) return arr;
            long[] res = pow(arr, exp / 2);
            long[] sq = modmult(res, res);
            if (exp % 2 == 0) {
                return sq;
            } else {
                return modmult(sq, arr);
            }
        }

        public void solve(int testNumber, FastScanner s, PrintWriter out) {
            N = s.nextInt();
            K = s.nextInt();
            prices = new long[1001];
            for (int i = 0; i < N; i++)
                prices[s.nextInt()] = 1;

            long[] ways = pow(prices, K);
//        out.println(Arrays.toString(ways));
            HashSet<Integer> nums = new HashSet<>();
            for (int i = 0; i < ways.length; i++)
                if (ways[i] > 0)
                    nums.add(i);
            PriorityQueue<Integer> set = new PriorityQueue<>(nums);
            StringBuilder sout = new StringBuilder("");
            while (!set.isEmpty())
                sout.append(set.poll() + " ");
            out.println(sout.toString());
        }

    }

    static class FFT {
        public static void fft(double[] a, double[] b, boolean invert) {
            int n = a.length;
            int shift = 32 - Integer.numberOfTrailingZeros(n);
            for (int i = 1; i < n; i++) {
                int j = Integer.reverse(i << shift);
                if (i < j) {
                    double temp = a[i];
                    a[i] = a[j];
                    a[j] = temp;
                    temp = b[i];
                    b[i] = b[j];
                    b[j] = temp;
                }
            }
            for (int len = 2; len <= n; len <<= 1) {
                int halfLen = len >> 1;
                double angle = 2 * Math.PI / len * (invert ? -1 : 1);
                double wLenA = Math.cos(angle);
                double wLenB = Math.sin(angle);
                for (int i = 0; i < n; i += len) {
                    double wA = 1;
                    double wB = 0;
                    for (int j = 0; j < halfLen; j++) {
                        double uA = a[i + j];
                        double uB = b[i + j];
                        double vA = a[i + j + halfLen] * wA - b[i + j + halfLen] * wB;
                        double vB = a[i + j + halfLen] * wB + b[i + j + halfLen] * wA;
                        a[i + j] = uA + vA;
                        b[i + j] = uB + vB;
                        a[i + j + halfLen] = uA - vA;
                        b[i + j + halfLen] = uB - vB;
                        double nextWA = wA * wLenA - wB * wLenB;
                        wB = wA * wLenB + wB * wLenA;
                        wA = nextWA;
                    }
                }
            }
            if (invert) {
                for (int i = 0; i < n; i++) {
                    a[i] /= n;
                    b[i] /= n;
                }
            }
        }

        public static long[] multiply(long[] a, long[] b) {
            int resultSize = Integer.highestOneBit(Math.max(a.length, b.length) - 1) << 2;
            resultSize = Math.max(resultSize, 2);
            double[] aReal = new double[resultSize];
            double[] aImaginary = new double[resultSize];
            double[] bReal = new double[resultSize];
            double[] bImaginary = new double[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];
            fft(aReal, aImaginary, false);
            fft(bReal, bImaginary, false);
            for (int i = 0; i < resultSize; i++) {
                double real = aReal[i] * bReal[i] - aImaginary[i] * bImaginary[i];
                aImaginary[i] = aImaginary[i] * bReal[i] + bImaginary[i] * aReal[i];
                aReal[i] = real;
            }
            fft(aReal, aImaginary, true);
            long[] result = new long[resultSize];
            long carry = 0;
            for (int i = 0; i < resultSize; i++) {
                result[i] = Math.round(aReal[i]) + carry;
//            carry = result[i] / 10;
//            result[i] %= 10;
            }
            return result;
        }

    }

    static class FastScanner {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public FastScanner(InputStream stream) {
            this.stream = stream;
        }

        int read() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public String next() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

    }
}