#include <bits/stdc++.h>
using namespace std;
const int N = 1 << 22;
const double PI = acos((double)-1);
int n, k;
int a[N], ans[N];
int rev[N];
complex<double> fa[N], fb[N];
complex<double> w[N];
void calc_rev(int n, int logn) {
  for (int i = 0; i < n; ++i) {
    rev[i] = 0;
    for (int j = 0; j < logn; ++j)
      if ((i >> j) & 1) rev[i] |= 1 << (logn - j - 1);
  }
}
void fft(complex<double> a[], int n, bool invert) {
  for (int i = 0; i < n; ++i)
    if (i < rev[i]) swap(a[i], a[rev[i]]);
  for (int i = 0; i < n; ++i) {
    double alpha = 2 * PI / n * i * (invert ? -1 : 1);
    w[i] = complex<double>(cos(alpha), sin(alpha));
  }
  for (int len = 2; len <= n; len <<= 1) {
    for (int i = 0; i < n; i += len) {
      for (int j = 0; j < (len >> 1); ++j) {
        complex<double> u = a[i + j],
                        v = a[i + j + (len >> 1)] * w[n / len * j];
        a[i + j] = u + v;
        a[i + j + (len >> 1)] = u - v;
      }
    }
  }
  if (invert)
    for (int i = 0; i < n; ++i) a[i] /= n;
}
void multiply(int a[], int b[], int &na, int nb) {
  int low = max(na, nb), n, logn = 0;
  for (n = 1; n < low; n <<= 1) ++logn;
  n <<= 1, ++logn;
  calc_rev(n, logn);
  for (int i = 0; i < n; ++i) fa[i] = fb[i] = complex<double>(0);
  for (int i = 0; i < na; ++i) fa[i] = complex<double>(a[i]);
  for (int i = 0; i < nb; ++i) fb[i] = complex<double>(b[i]);
  fft(fa, n, false);
  fft(fb, n, false);
  for (int i = 0; i < n; ++i) fa[i] *= fb[i];
  fft(fa, n, true);
  for (int i = 0; i < n; ++i) a[i] = (int)(real(fa[i]) + 0.5) > 0;
  na = n;
}
void pow(int a[], int k) {
  ans[0] = 1;
  int n = 1024;
  int na = 1024;
  while (k) {
    if (k & 1) multiply(ans, a, n, na);
    multiply(a, a, na, na);
    k >>= 1;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> k;
  for (int i = 0; i < n; ++i) {
    int x;
    cin >> x;
    a[x] = 1;
  }
  pow(a, k);
  for (int i = 0; i < N; ++i) {
    if (ans[i]) cout << i << ' ';
  }
}
