#include <bits/stdc++.h>
using namespace std;
const int maxn = 1 << 20, inf = 1e9 + 233, mod = 1004535809;
int x, N, n, m;
int a[maxn], b[maxn], ans[maxn], c[maxn], mi1[maxn], mi2[maxn];
template <typename T>
inline void read(T &k) {
  int f = 1;
  k = 0;
  char c = getchar();
  while (c < '0' || c > '9') c == '-' && (f = -1), c = getchar();
  while (c <= '9' && c >= '0') k = k * 10 + c - '0', c = getchar();
  k *= f;
}
inline int power(int a, int b) {
  int ans = 1;
  for (; b; b >>= 1, a = 1ll * a * a % mod)
    if (b & 1) ans = 1ll * a * ans % mod;
  return ans;
}
inline void ntt(int *a, int *w, int f) {
  for (int i = 0, j = 0; i < N; i++) {
    if (i < j) swap(a[i], a[j]);
    for (int k = N >> 1; (j ^= k) < k; k >>= 1)
      ;
  }
  for (int i = 2; i <= N; i <<= 1) {
    for (int j = 0, m = i >> 1; j < N; j += i) {
      for (int k = 0; k < m; k++) {
        int t = 1ll * a[j + k + m] * w[N / i * k] % mod;
        a[j + k + m] =
            ((a[j + k] - t + mod) >= mod ? ((a[j + k] - t + mod) - mod)
                                         : (a[j + k] - t + mod));
        a[j + k] =
            ((a[j + k] + t) >= mod ? ((a[j + k] + t) - mod) : (a[j + k] + t));
      }
    }
  }
  if (f == -1)
    for (int i = 0, inv = power(N, mod - 2); i < N; i++)
      a[i] = 1ll * a[i] * inv % mod;
}
inline void mul(int *a, int *b) {
  for (int i = 0; i < N; i++) c[i] = b[i];
  ntt(a, mi1, 1);
  ntt(c, mi1, 1);
  for (int i = 0; i < N; i++) a[i] = 1ll * a[i] * c[i] % mod;
  ntt(a, mi2, -1);
  for (int i = 0; i < N; i++) a[i] = !!a[i];
}
inline void womulwoziji(int *a) {
  ntt(a, mi1, 1);
  for (int i = 0; i < N; i++) a[i] = 1ll * a[i] * a[i] % mod;
  ntt(a, mi2, -1);
  for (int i = 0; i < N; i++) a[i] = !!a[i];
}
inline void power(int b) {
  ans[0] = 1;
  for (; b; b >>= 1, womulwoziji(a))
    if (b & 1) mul(ans, a);
}
inline void init() {
  int base = power(3, (mod - 1) / N);
  mi1[0] = 1;
  for (int i = 1; i <= (N >> 1); i++) mi1[i] = 1ll * mi1[i - 1] * base % mod;
  base = power(base, mod - 2);
  mi2[0] = 1;
  for (int i = 1; i <= (N >> 1); i++) mi2[i] = 1ll * mi2[i - 1] * base % mod;
}
int main() {
  read(n);
  read(m);
  int mx = 0;
  for (int i = 1; i <= n; i++) read(x), a[x] = 1, mx = max(mx, x);
  for (N = 1; N < (m * mx + 1); N <<= 1)
    ;
  init();
  power(m);
  for (int i = 0; i <= m * mx; i++)
    if (ans[i]) printf("%d ", i);
}
