#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
vector<long long> order;
void fft(vector<complex<double> > &a, bool invert) {
  long long n = a.size();
  for (int i = 0; i < n; i++)
    if (order[i] < i) swap(a[i], a[order[i]]);
  for (int len = 2; len <= n; len <<= 1) {
    double ang = 2 * PI / len * (invert ? -1 : 1);
    complex<double> wlen(cos(ang), sin(ang));
    long long half = len >> 1;
    vector<complex<double> > w(half);
    complex<double> w0(1);
    for (int i = 0; i < half; i++) w[i] = w0, w0 *= wlen;
    for (int i = 0; i < n; i += len) {
      for (int j = 0; j < half; j++) {
        complex<double> u = a[i + j];
        complex<double> v = a[i + j + half] * w[j];
        a[i + j] = u + v;
        a[i + j + half] = u - v;
      }
    }
  }
  if (invert)
    for (int i = 0; i < n; i++) a[i] /= n;
}
void precalc(long long n, long long L) {
  order.resize(n);
  for (int i = 0; i < n; i++) {
    long long res = 0;
    for (int j = 0; j < L; j++)
      if (i & (1 << j)) res |= 1 << (L - j - 1);
    order[i] = res;
  }
}
vector<long long> multiply(vector<long long> a, vector<long long> b) {
  vector<complex<double> > fa(a.begin(), a.end()), fb(b.begin(), b.end());
  long long n = 1;
  long long L = 0;
  while (a.size() + b.size() > n) n <<= 1, L++;
  fa.resize(n);
  fb.resize(n);
  precalc(n, L);
  fft(fa, false);
  fft(fb, false);
  for (int i = 0; i < n; i++) fa[i] *= fb[i];
  fft(fa, true);
  vector<long long> res(n);
  for (int i = 0; i < n; i++) {
    res[i] = (int)(fa[i].real() + 0.5);
    res[i] = min(res[i], 1ll);
  }
  while (res.back() == 0 && res.size() > 1) res.pop_back();
  return res;
}
long long a[2100];
int main() {
  long long n, k;
  vector<long long> v1;
  vector<long long> v2;
  cin >> n >> k;
  long long mx = 0;
  for (long long i = 0; i < n; i++) {
    long long x;
    scanf("%lld", &x);
    a[x] = 1;
  }
  for (long long i = 0; i <= 1000; i++) {
    v1.push_back(a[i]);
  }
  vector<long long> v = v1;
  vector<long long> z(1, 1);
  while (k) {
    if (k & 1) z = multiply(z, v1);
    v1 = multiply(v1, v1);
    k >>= 1;
  }
  long long ans = 0;
  for (long long i = 0; i < z.size(); ++i)
    if (z[i]) {
      printf("%lld ", i);
    }
  return 0;
}
