#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
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 * PI / 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;
}
void multiply(const vector<int>& a, const vector<int>& b, vector<int>& res) {
  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);
  res.resize(n);
  for (size_t i = 0; i < n; ++i) res[i] = min(1, int(fa[i].real() + 0.5));
  while (!res.back()) res.pop_back();
}
vector<int> p1;
int main() {
  int i, n, k, v;
  p1.resize(1000 + 1);
  scanf("%d %d", &n, &k);
  for (i = 1; i <= n; i++) {
    scanf("%d", &v);
    p1[v] = 1;
  }
  vector<int> aux = p1, res = {1};
  while (true) {
    if (k & 1) multiply(res, aux, res);
    k = k / 2;
    if (!k) break;
    multiply(aux, aux, aux);
  }
  for (i = 0; i < (int)res.size(); i++)
    if (res[i]) printf("%d ", i);
  return 0;
}
