#include <bits/stdc++.h>
using namespace std;
long long expo(long long base, long long exponent, long long mod) {
  long long ans = 1;
  while (exponent != 0) {
    if (exponent & 1) ans = (1LL * ans * base) % mod;
    base = (1LL * base * base) % mod;
    exponent >>= 1;
  }
  return ans % mod;
}
const long long mod = 998244353;
const long long root = 565042129;
const long long root_1 = 950391366;
const long long root_pw = 1 << 20;
void fft(vector<long long> &a, bool invert) {
  long long i, j, n = (long long)a.size();
  for (i = 1, j = 0; i < n; ++i) {
    long long bit = n >> 1;
    for (; j >= bit; bit >>= 1) {
      j -= bit;
    }
    j += bit;
    if (i < j) swap(a[i], a[j]);
  }
  for (long long len = 2; len <= n; len <<= 1) {
    long long wlen = invert ? root_1 : root;
    for (i = len; i < root_pw; i <<= 1) {
      wlen = (wlen * wlen % 998244353);
    }
    for (i = 0; i < n; i += len) {
      long long w = 1;
      for (j = 0; j < len / 2; ++j) {
        long long u = a[i + j],
                  v = (long long)(a[i + j + len / 2] * w % 998244353);
        a[i + j] = (u + v + 998244353) % 998244353;
        a[i + j + len / 2] = (u - v + 998244353) % 998244353;
        w = (w * wlen % 998244353);
      }
    }
  }
  if (invert) {
    long long nrev = expo(n, 998244353 - 2, 998244353);
    for (i = 0; i < n; ++i) {
      a[i] = (a[i] * nrev % 998244353);
    }
  }
}
void multiply(const vector<long long> &a, const vector<long long> &b,
              vector<long long> &res) {
  vector<long long> fa(a.begin(), a.end()), fb(b.begin(), b.end());
  size_t n = 1;
  while (n < max(a.size(), b.size())) n <<= 1;
  n <<= 1;
  fa.resize(n), fb.resize(n);
  fft(fa, false), fft(fb, false);
  for (size_t i = 0; i < n; ++i) {
    fa[i] *= fb[i];
  }
  fft(fa, true);
  res.resize(n);
  for (size_t i = 0; i < n; ++i) {
    res[i] = fa[i];
  }
}
vector<long long> ans;
signed main() {
  long long n, first, k;
  vector<long long> pol(1001, 0);
  vector<long long> ans(1, 1);
  cin >> n >> k;
  vector<long long> temp;
  for (long long i = 0; i < (long long)n; i++) {
    cin >> first;
    pol[first] = 1;
  }
  while (k) {
    if (k % 2) {
      multiply(ans, pol, ans);
      for (long long i = 0; i < (long long)ans.size(); i++) {
        if (ans[i])
          ans[i] = 1;
        else
          ans[i] = 0;
      }
    }
    multiply(pol, pol, pol);
    for (long long i = 0; i < (long long)pol.size(); i++) {
      if (pol[i])
        pol[i] = 1;
      else
        pol[i] = 0;
    }
    k /= 2;
  }
  for (long long i = 0; i < (long long)ans.size(); i++) {
    if (ans[i]) cout << i << " ";
  }
}
