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>
#pragma GCC optimize(3)
#pragma GCC optimize("Ofast")
#pragma GCC optimize("inline")
using namespace std;
bool Finish_read;
template <class T>
inline void read(T &x) {
  Finish_read = 0;
  x = 0;
  int f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    if (ch == EOF) return;
    ch = getchar();
  }
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  x *= f;
  Finish_read = 1;
}
template <class T>
inline void print(T x) {
  if (x / 10 != 0) print(x / 10);
  putchar(x % 10 + '0');
}
template <class T>
inline void writeln(T x) {
  if (x < 0) putchar('-');
  x = abs(x);
  print(x);
  putchar('\n');
}
template <class T>
inline void write(T x) {
  if (x < 0) putchar('-');
  x = abs(x);
  print(x);
}
const long long mod = 985661441;
namespace {
inline long long Pow(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
    b >>= 1;
  }
  return res;
}
inline long long Inv(const long long &x) { return Pow(x, mod - 2); }
inline long long Add(const long long &x, const long long &y) {
  long long res = x + y;
  if (res >= mod) res -= mod;
  return res;
}
inline long long Sub(const long long &x, const long long &y) {
  long long res = x - y;
  if (res < 0) res += mod;
  return res;
}
inline long long Mul(const long long &x, const long long &y) {
  long long res = x * y;
  if (res >= mod) res %= mod;
  return res;
}
inline long long Div(const long long &x, const long long &y) {
  long long res = x * Inv(y);
  if (res >= mod) res %= mod;
  return res;
}
}  // namespace
namespace Transform {
static const int fmaxn = 20, Fmaxn = (1 << fmaxn) + 1, G = 3;
int mx = 0, rev[Fmaxn], W[fmaxn][Fmaxn];
inline void DFT(int *a, int n) {
  if (mx < n) {
    for (int i = mx; i < n; ++i) {
      int len = (1 << i);
      long long w0 = Pow(G, (mod - 1) / (len << 1)), w = 1;
      for (int j = 0; j < len; ++j) W[i][j] = w, w = Mul(w, w0);
    }
    mx = n;
  }
  rev[0] = 0;
  for (int i = 1; i < (1 << n); ++i) {
    rev[i] = i & 1 ? rev[i ^ 1] | (1 << (n - 1)) : rev[i >> 1] >> 1;
    if (i < rev[i]) swap(a[i], a[rev[i]]);
  }
  for (int l = 0; l < n; ++l) {
    int len = (1 << l);
    for (int i = 0; i < (1 << n); i += (len << 1)) {
      for (int j = 0; j < len; ++j) {
        int x = a[i + j], y = Mul(a[i + j + len], W[l][j]);
        a[i + j] = Add(x, y), a[i + j + len] = Sub(x, y);
      }
    }
  }
}
inline void IDFT(int *a, int n) {
  reverse(a + 1, a + (1 << n));
  DFT(a, n);
  long long invn = Inv((1 << n));
  for (int i = 0; i < (1 << n); ++i) a[i] = Mul(a[i], invn);
}
}  // namespace Transform
int n, m, v[1005], mx, now[1048577];
int main() {
  read(n), read(m);
  for (int i = 1; i <= n; ++i) read(v[i]), mx = max(mx, v[i]);
  sort(v + 1, v + n + 1);
  n = unique(v + 1, v + n + 1) - v - 1;
  mx = m * mx;
  int lim = 0;
  while ((1 << lim) < mx) lim++;
  for (int i = 1; i <= n; ++i) now[v[i]] = 1;
  Transform::DFT(now, lim);
  for (int i = 0; i <= (1 << lim); ++i) now[i] = Pow(now[i], m);
  Transform::IDFT(now, lim);
  for (int i = 0; i <= (1 << lim); ++i)
    if (now[i]) printf("%d ", i);
  puts("");
}
