#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const int ms = 1 << 20;
complex<double> base[ms], ret[ms];
int n, m;
void fft(complex<double> p[], int n, int oper) {
  for (int i = 1, j = 0; i < n - 1; ++i) {
    for (int s = n; j ^= s >>= 1, ~j & s;)
      ;
    if (i < j) swap(p[i], p[j]);
  }
  complex<double> wn, w;
  for (int d = 0; (1 << d) < n; ++d) {
    int m = 1 << d, m2 = m << 1;
    double p0 = pi / m * oper;
    wn = complex<double>(cos(p0), sin(p0));
    for (int i = 0; i < n; i += m2) {
      w = 1;
      for (int j = 0; j < m; ++j) {
        complex<double> &p1 = p[i + j + m], &p2 = p[i + j];
        complex<double> t = w * p1;
        p1 = p2 - t;
        p2 = p2 + t;
        w = w * wn;
      }
    }
  }
  if (oper == -1)
    for (int i = 0; i < n; ++i) p[i] /= n;
}
void mult(complex<double> a[], int &asz, complex<double> b[], int bsz) {
  int N = 1;
  while (N < asz + bsz) N <<= 1;
  fft(a, N, 1);
  if (a != b) fft(b, N, 1);
  for (int i = 0; i < N; ++i) {
    a[i] *= b[i];
  }
  fft(a, N, -1);
  if (a != b) fft(b, N, -1);
  for (int i = 0; i < N; ++i) {
    a[i] = complex<double>(a[i].real() > 0.5, 0);
    b[i] = complex<double>(b[i].real() > 0.5, 0);
  }
  asz = N;
}
void fexp(int expo) {
  ret[0] = complex<double>(1, 0);
  m = 1;
  while (expo) {
    if (expo & 1) {
      mult(ret, m, base, n);
    }
    mult(base, n, base, n);
    expo >>= 1;
  }
}
void write(int x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x / 10) {
    write(x / 10);
  }
  putchar(x % 10 + '0');
}
int main() {
  int k;
  cin >> n >> k;
  for (int i = 0; i < n; ++i) {
    int tmp;
    scanf("%d", &tmp);
    base[tmp] = complex<double>(1, 0);
    n = max(tmp + 1, n);
  }
  fexp(k);
  for (int i = 0; i < ms; ++i) {
    if (ret[i].real() > 0.5) {
      write(i);
      putchar(' ');
    }
  }
  puts("");
  return 0;
}
