#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const int maxN = 1005;
int n, k;
int a[maxN];
vector<complex<double> > q((1 << 20));
vector<complex<double> > qq((1 << 20));
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;
}
vector<complex<double> > mult(vector<complex<double> > p,
                              vector<complex<double> > t, bool sq) {
  if (sq) {
    fft(p, false);
    for (int i = 0; i < p.size(); i++) p[i] = p[i] * p[i];
    fft(p, true);
  } else {
    fft(p, false);
    for (int i = 0; i < p.size(); i++) p[i] = p[i] * p[i] * q[i];
    fft(p, true);
  }
  for (int i = 0; i < p.size(); i++) {
    if (p[i].real() > 0.5) {
      p[i] = 1;
    } else
      p[i] = 0;
  }
  return p;
}
vector<complex<double> > pw(vector<complex<double> > p, int k) {
  if (k == 1) return p;
  vector<complex<double> > to = pw(p, k / 2);
  if ((k & 1) == 0)
    return mult(to, to, true);
  else
    return mult(to, p, false);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    q[a[i]] = 1;
    qq[a[i]] = 1;
  }
  fft(q, false);
  vector<complex<double> > p = pw(qq, k);
  for (int i = 1; i < (1 << 20); i++) {
    if (p[i].real() > 0.5) cout << i << " ";
  }
  return 0;
}
