#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];
template <typename num>
void fft(const num* x, int step, complex<double>* y, int n, bool inv = 0) {
  if (n == 1) {
    *y = *x;
    return;
  }
  int m = n >> 1;
  fft(x, step << 1, y, m, inv);
  fft(x + step, step << 1, y + m, m, inv);
  complex<double> w = 1, ww = polar(1.0, (inv ? -1 : 1) * 2 * PI / n), t1, t2;
  for (int i = 0, j = m; j < n; ++i, ++j) {
    t1 = y[i] + w * y[j];
    t2 = y[i] - w * y[j];
    if (inv) t1 /= 2, t2 /= 2;
    y[i] = t1, y[j] = t2;
    w *= ww;
  }
}
void mul_poly(int* a, int* b, int n) {
  fft(a, 1, tm1, n);
  fft(b, 1, tm2, n);
  for (int i = 0; i < n; ++i) tm1[i] *= tm2[i];
  fft(tm1, 1, tm2, n, true);
  for (int i = 0; i < n; ++i) a[i] = (int(tm2[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();
}
