#include <bits/stdc++.h>
using namespace std;
const int N = (1 << 20);
const double pi = acos(-1);
vector<complex<double> > g(N), ans(N);
int revbit(int nbit, int mask) {
  for (int i = 0, j = nbit - 1; i < j; ++i, --j)
    if ((mask >> i & 1) != (mask >> j & 1)) {
      mask ^= (1 << i);
      mask ^= (1 << j);
    }
  return mask;
}
void FFT(int n, vector<complex<double> >& a, bool inv) {
  if (n == 1) return;
  for (int i = 0; i < n; ++i) {
    int j = revbit(log2(n), i);
    if (i < j) swap(a[i], a[j]);
  }
  vector<complex<double> > anex(n);
  for (int st = 1; st < n; st <<= 1) {
    double alp = pi / st;
    if (inv) alp = -alp;
    complex<double> u(cos(alp), sin(alp));
    int even = 0, odd = st;
    while (even < n) {
      complex<double> W(1);
      for (int i = 0; i < st; ++i) {
        anex[even + i] = a[even + i] + W * a[odd + i];
        anex[odd + i] = a[even + i] - W * a[odd + i];
        W *= u;
      }
      even += 2 * st;
      odd += 2 * st;
    }
    for (int i = 0; i < n; ++i) a[i] = anex[i];
  }
  if (inv)
    for (int i = 0; i < n; ++i) a[i] /= n;
}
signed main() {
  int n, k, deg = 0;
  scanf("%d%d", &n, &k);
  while (n--) {
    int x;
    scanf("%d", &x);
    g[x] = 1;
    deg = max(deg, x);
  }
  ans[0] = 1;
  int m = log2(deg) + 2, i = 0;
  deg = (1 << m);
  while (k) {
    FFT(deg << i, g, 0);
    if (k & 1) {
      FFT(deg << i, ans, 0);
      for (int j = 0; j < (deg << i); ++j) ans[j] = ans[j] * g[j];
      FFT(deg << i, ans, 1);
      for (int j = 0; j < (deg << i); ++j) {
        double m = round(ans[j].real());
        if (m >= 1) m = 1;
        ans[j] = m;
      }
    }
    for (int j = 0; j < (deg << i); ++j) g[j] = g[j] * g[j];
    FFT(deg << i, g, 1);
    for (int j = 0; j < (deg << i); ++j) {
      double m = round(g[j].real());
      if (m >= 1) m = 1;
      g[j] = m;
    }
    k >>= 1;
    i++;
  }
  for (int i = 0; i < N; ++i)
    if (ans[i].real() > 0) printf("%d ", i);
}
