#include <bits/stdc++.h>
using namespace std;
void acota(vector<int> &p) {
  size_t i = p.size();
  for (; !p[i - 1]; --i)
    ;
  p.resize(i);
}
void simplify(vector<int> &p) {
  acota(p);
  for (int i = 0; i < p.size(); i++)
    if (p[i]) p[i] = 1;
}
void fft(vector<complex<long double> > &a, bool invert = false) {
  int n = 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 * 3.14159265358979323846 / len * (invert ? -1 : 1);
    complex<long double> wlen(cos(ang), sin(ang));
    for (int i = 0; i < n; i += len) {
      complex<long double> w(1);
      for (int j = 0; j < len / 2; ++j) {
        complex<long 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> &ans) {
  vector<complex<long 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);
  fft(fb);
  for (int i = 0; i < n; ++i) fa[i] *= fb[i];
  fft(fa, true);
  ans.resize(n);
  for (int i = 0; i < n; ++i) ans[i] = (int)round(fa[i].real());
}
void exp(const vector<int> &p, const int e, vector<int> &ans) {
  if (e == 1) {
    ans = p;
  } else {
    exp(p, e / 2, ans);
    multiply(ans, ans, ans);
    simplify(ans);
    if (e & 1) {
      multiply(ans, p, ans);
      simplify(ans);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, k;
  vector<int> p(1001);
  cin >> n >> k;
  for (int i = 0; i < n; ++i) {
    int x;
    cin >> x;
    p[x] = 1;
  }
  acota(p);
  vector<int> ans;
  exp(p, k, ans);
  for (int i = 0; i < ans.size(); ++i)
    if (ans[i]) cout << i << " ";
  return 0;
}
