#include <bits/stdc++.h>
using namespace std;
const double PI = 3.141592653589793238462643383279;
const int M = 1 << 20;
const int VAL = 1000;
int k, a[M], f[M];
complex<double> tm1[M], tm2[M];
void fft(complex<double> *a, int n, bool inv) {
  for (int i = 1, j = 0, bit; i < n; ++i) {
    bit = n >> 1;
    for (; j >= bit; bit >>= 1) j -= bit;
    j += bit;
    if (i < j) swap(a[i], a[j]);
  }
  complex<double> ww, w, *p1, *p2, *pe, t1, t2;
  for (int len = 2; len <= n; len <<= 1) {
    ww = polar(1.0, (inv ? 1 : -1) * 2 * PI / len);
    for (int i = 0; i < n; i += len) {
      w = 1;
      for (p1 = a + i, p2 = a + i + (len >> 1), pe = p2; p1 != pe; ++p1, ++p2) {
        t1 = *p1;
        t2 = w * (*p2);
        *p1 = t1 + t2;
        *p2 = t1 - t2;
        w *= ww;
      }
    }
  }
  if (inv)
    for (int i = 0; i < n; ++i) a[i] /= n;
}
void mul_poly(int *a, int *b, int n) {
  copy(a, a + n, tm1);
  copy(b, b + n, tm2);
  fft(tm1, n, false);
  fft(tm2, n, false);
  for (int i = 0; i < n; ++i) tm1[i] *= tm2[i];
  fft(tm1, n, true);
  for (int i = 0; i < n; ++i) a[i] = (int(tm1[i].real() + 0.5) != 0);
}
void enter() {
  int n, x;
  for (cin >> n >> k; n; --n) {
    cin >> x;
    ++a[x];
  }
}
void print() {
  for (int i = 0; i < M; ++i)
    if (f[i]) printf("%d ", i);
}
int convert_pow2(int x) {
  int res = 1;
  while (res <= x) res <<= 1;
  return res;
}
void pow(int *a, int k, int *f) {
  if (k == 1) {
    copy(a, a + M, f);
    return;
  }
  pow(a, k >> 1, f);
  mul_poly(f, f, convert_pow2(VAL * k));
  if (k & 1) mul_poly(f, a, convert_pow2(VAL * k));
}
int main() {
  ios_base::sync_with_stdio(0);
  enter();
  pow(a, k, f);
  print();
}
