#include <bits/stdc++.h>
using namespace std;
int setBit(int n, int pos) { return n = n | (1 << pos); }
int resetBit(int n, int pos) { return n = n & ~(1 << pos); }
bool checkBit(int n, int pos) { return (bool)(n & (1 << pos)); }
void fft(vector<complex<double> >& a, bool invert) {
  int n = (int)a.size();
  for (int i = 1, j = 0; i < n; ++i) {
    int bit = n >> 1;
    for (; j >= bit; bit >>= 1) j -= bit;
    j += bit;
    if (i < j) swap(a[i], a[j]);
  }
  for (int len = 2; len <= n; len <<= 1) {
    double ang = 2 * acos(-1.0) / len * (invert ? -1 : 1);
    complex<double> wlen(cos(ang), sin(ang));
    for (int i = 0; i < n; i += len) {
      complex<double> w(1);
      for (int j = 0; j < len / 2; ++j) {
        complex<double> u = a[i + j], v = a[i + j + len / 2] * w;
        a[i + j] = u + v;
        a[i + j + len / 2] = u - v;
        w *= wlen;
      }
    }
  }
  if (invert)
    for (int i = 0; i < n; ++i) a[i] /= n;
}
vector<bool> multiply(const vector<bool>& a, const vector<bool>& b) {
  vector<complex<double> > 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);
  vector<bool> res;
  res.resize(n);
  for (size_t i = 0; i < n; ++i) res[i] = int(fa[i].real() + 0.5);
  while (res.size() && res.back() == 0) res.pop_back();
  return res;
}
vector<bool> a, b, res;
vector<bool> exp(vector<bool>& a, int n) {
  vector<bool> ret({1});
  while (n) {
    if (n & 1) ret = multiply(ret, a);
    a = multiply(a, a);
    n >>= 1;
  }
  return ret;
}
int A[1010];
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  int mx = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &A[i]);
    mx = max(mx, A[i]);
  }
  a.assign(mx + 1, 0);
  for (int i = 1; i <= n; i++) a[A[i]] = true;
  res = exp(a, k);
  int ans = 0;
  for (int i = 1; i < res.size(); i++) {
    if (res[i]) cout << i << " ";
  }
  cout << endl;
  return 0;
}
