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
#include <bits/stdc++.h>
using namespace std;
long long powr(long long a, long long b, const long long& mod) {
  long long x = 1;
  a %= mod;
  while (b) {
    if (b & 1) x = (x * a) % mod;
    a = (a * a) % mod;
    b >>= 1;
  }
  return x;
}
long long inv(long long a, long long mod) { return powr(a, mod - 2, mod); }
struct base {
  double x, y;
  inline base() { x = y = 0; }
  inline base(double _x, double _y) { x = _x, y = _y; }
  inline base(double _x) { x = _x, y = 0; }
  inline void operator=(double _x) { x = _x, y = 0; }
  inline double real() { return x; }
  inline double imag() { return y; }
  inline base operator+(const base& b) { return base(x + b.x, y + b.y); }
  inline void operator+=(const base& b) { x += b.x, y += b.y; }
  inline base operator*(const base& b) {
    return base(x * b.x - y * b.y, x * b.y + y * b.x);
  }
  inline void operator*=(const base& b) {
    double p = x * b.x - y * b.y, q = x * b.y + y * b.x;
    x = p, y = q;
  }
  inline void operator/=(double k) { x /= k, y /= k; }
  inline base operator-(const base& b) { return base(x - b.x, y - b.y); }
  inline void operator-=(const base& b) { x -= b.x, y -= b.y; }
};
const double PI = 2.0 * acos(0.0);
const int MAXN = 20;
const int maxn = (1 << MAXN);
base W[maxn], invW[maxn];
void precompute_powers() {
  for (int i = 0; i < maxn / 2; i++) {
    double ang = (2 * PI * i) / maxn;
    double _cos = cos(ang), _sin = sin(ang);
    W[i] = base(_cos, _sin);
    invW[i] = base(_cos, -_sin);
  }
}
void fft(vector<base>& a, bool invert) {
  int n = (int)a.size();
  for (int i = 1, j = 0; i < n; ++i) {
    int bit = n >> 1;
    for (; j >= bit; bit >>= 1) j -= bit;
    j += bit;
    if (i < j) swap(a[i], a[j]);
  }
  for (int len = 2; len <= n; len <<= 1) {
    for (int i = 0; i < n; i += len) {
      int ind = 0, add = maxn / len;
      for (int j = 0; j < len / 2; ++j) {
        base u = a[i + j],
             v = (a[i + j + len / 2] * (invert ? invW[ind] : W[ind]));
        a[i + j] = (u + v);
        a[i + j + len / 2] = (u - v);
        ind += add;
      }
    }
  }
  if (invert)
    for (int i = 0; i < n; ++i) a[i] /= n;
}
void multiply(vector<long long>& a, vector<long long>& B) {
  vector<long long> b = B;
  vector<base> fa(a.begin(), a.end()), fb(b.begin(), b.end());
  int fsz = a.size() + b.size() - 1;
  int n = 1;
  while (n < max(a.size(), b.size())) n <<= 1;
  n <<= 1;
  fa.resize(n), fb.resize(n);
  fft(fa, false), fft(fb, false);
  for (size_t i = 0; i < n; ++i) fa[i] *= fb[i];
  fft(fa, true);
  a.resize(fsz);
  for (int i = 0; i < fsz; i++)
    a[i] = ((long long)(fa[i].real() + 0.5)) > 0 ? 1 : 0;
}
void sqr(vector<long long>& a) {
  vector<base> fa(a.begin(), a.end());
  int fsz = 2 * a.size() - 1;
  int n = 1;
  while (n < a.size()) n <<= 1;
  n <<= 1;
  fa.resize(n);
  fft(fa, false);
  for (size_t i = 0; i < n; ++i) fa[i] *= fa[i];
  fft(fa, true);
  a.resize(fsz);
  for (int i = 0; i < fsz; i++)
    a[i] = ((long long)(fa[i].real() + 0.5)) > 0 ? 1 : 0;
}
void polypow(vector<long long>& a, int k) {
  vector<long long> b = {1};
  while (k) {
    if (k & 1) multiply(b, a);
    sqr(a);
    k >>= 1;
  }
  a = b;
}
vector<long long> b;
const int N = 1005;
int a[N];
int main() {
  int i, n, k, maxi = 0;
  scanf("%d %d", &n, &k);
  for (i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    maxi = max(maxi, a[i]);
  }
  b.resize(maxi + 1);
  for (i = 1; i <= n; i++) b[a[i]] = 1;
  precompute_powers();
  polypow(b, k);
  for (int i = 1; i <= maxi * k; i++)
    if (b[i]) printf("%d ", i);
  return 0;
}
