#include <bits/stdc++.h>
using namespace std;
const long double PI = acos((long double)-1);
namespace fft {
template <class T>
class comp {
 public:
  T real, img;
  comp(T a = (T)0, T b = (T)0) : real(a), img(b) {}
  comp conj() { return comp(this->real, -(this->img)); }
  comp operator=(const comp& a) {
    this->real = a.real, this->img = a.img;
    return *this;
  }
  comp operator+(const comp& b) {
    return comp(this->real + b.real, this->img + b.img);
  }
  comp operator-(const comp& b) {
    return comp(this->real - b.real, this->img - b.img);
  }
  comp operator*(const T& num) {
    return comp(this->real * num, this->img * num);
  }
  comp operator/(const T& num) {
    return comp(this->real / num, this->img / num);
  }
  comp operator*(const comp& b) {
    return comp(this->real * b.real - this->img * b.img,
                this->img * b.real + this->real * b.img);
  }
  comp operator/(const comp& b) {
    comp temp(b.real, -b.img);
    comp n = (*this) * temp;
    return n / (b.x * b.x + b.y * b.y);
  }
};
vector<comp<double> > w;
vector<int> rev;
void revbits(int newlim) {
  static int lim = -1;
  int t, j;
  if (newlim == lim) return;
  lim = newlim;
  rev.resize(lim + 1);
  int k = 0;
  while ((1 << k) < newlim) ++k;
  assert((1 << k) == newlim);
  for (int i = 1; i <= (int)(lim); ++i) {
    j = rev[i - 1];
    t = k - 1;
    while (t >= 0 && ((j >> t) & 1)) j ^= (1 << t), --t;
    if (t >= 0) j ^= (1 << t), --t;
    rev[i] = j;
  }
}
void fft(vector<comp<double> >& poly, int inv = false) {
  int len, l;
  revbits((int)(poly).size());
  if (inv)
    for (auto& x : poly) x = x.conj();
  for (int i = 0; i < (int)((int)(poly).size()); ++i)
    if (rev[i] > i) swap(poly[i], poly[rev[i]]);
  comp<double> u, v;
  w.resize((int)(poly).size());
  for (len = 2, l = 1; len <= (int)(poly).size(); len += len, l += l) {
    if (w[l].real == 0 && w[l].img == 0) {
      double ang = PI / l;
      comp<double> ww(cos(ang), sin(ang));
      if (l > 1) {
        for (int j = 0; j < l; ++j) {
          if (j & 1)
            w[l + j] = w[(l + j) >> 1] * ww;
          else
            w[l + j] = w[(l + j) >> 1];
        }
      } else
        w[l] = comp<double>(1.0, 0.0);
    }
    for (int i = 0; i < (int)(poly).size(); i += len)
      for (int j = 0; j < (int)(l); ++j) {
        u = poly[i + j], v = poly[i + j + l] * w[l + j];
        poly[i + j] = u + v, poly[i + j + l] = u - v;
      }
  }
  if (inv)
    for (auto& x : poly) x = x / (int)(poly).size();
}
vector<int> multiply(vector<int>& a, vector<int>& b) {
  int bits = 1, sz1 = (int)(a).size() + (int)(b).size(), reqsz;
  while ((1 << bits) < sz1) ++bits;
  reqsz = (1 << bits);
  vector<comp<double> > poly(reqsz);
  for (int i = 0; i < (int)((int)(a).size()); ++i) poly[i].real = a[i];
  for (int i = 0; i < (int)((int)(b).size()); ++i) poly[i].img = b[i];
  fft(poly);
  comp<double> p, qtmp, q;
  poly[0] = poly[0].real * poly[0].img;
  for (int i = 1; i <= (int)(reqsz >> 1); ++i) {
    p = poly[i] + poly[reqsz - i].conj(),
    qtmp = poly[reqsz - i] - poly[i].conj();
    q.real = qtmp.img, q.img = qtmp.real;
    poly[i] = (p * q) * 0.25;
    if (i) poly[reqsz - i] = poly[i].conj();
  }
  fft(poly, true);
  vector<int> ans(sz1 - 1);
  for (int i = 0; i < (int)((int)(ans).size()); ++i)
    ans[i] = (long long)(poly[i].real + 0.5);
  return ans;
}
}  // namespace fft
vector<int> powpoly(vector<int>& poly, int y) {
  vector<int> ans;
  ans.push_back(1);
  while (y) {
    if (y & 1) {
      ans = fft::multiply(ans, poly);
      for (int i = 0; i < (int)((int)(ans).size()); ++i) ans[i] = ans[i] > 0;
    }
    y >>= 1;
    poly = fft::multiply(poly, poly);
    for (int i = 0; i < (int)((int)(poly).size()); ++i) poly[i] = poly[i] > 0;
  }
  return ans;
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int N, K, a;
  cin >> N >> K;
  vector<int> poly(1e3 + 1, 0);
  for (int i = 1; i <= (int)(N); ++i) cin >> a, poly[a] = 1;
  vector<int> ans = powpoly(poly, K);
  for (int i = 0; i < (int)((int)(ans).size()); ++i)
    if (ans[i]) cout << i << " ";
  cout << "\n";
  return 0;
}
