#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
istream& operator>>(istream& in, pair<T1, T2>& a) {
  in >> a.first >> a.second;
  return in;
}
template <typename T1, typename T2>
ostream& operator<<(ostream& out, pair<T1, T2> a) {
  out << a.first << " " << a.second;
  return out;
}
template <typename T, typename T1>
T maxs(T& a, T1 b) {
  if (b > a) a = b;
  return a;
}
template <typename T, typename T1>
T mins(T& a, T1 b) {
  if (b < a) a = b;
  return a;
}
void fft(vector<complex<double> >& a, bool direction) {
  if ((long long)a.size() == 1) return;
  long long n = (long long)a.size();
  for (long long i = 1, j = 0; i < n; i++) {
    long long bit = n >> 1;
    for (; j >= bit; bit >>= 1) j -= bit;
    j += bit;
    if (i < j) swap(a[i], a[j]);
  }
  for (long long d = 2; d <= n; d <<= 1) {
    double ang = 2 * 3.141592653589793238 / d * (direction ? -1 : 1);
    complex<double> wd(cos(ang), sin(ang));
    for (long long i = 0; i < n; i += d) {
      complex<double> w(1);
      for (long long j = 0; j < d / 2; ++j) {
        complex<double> u = a[i + j], v = a[i + j + d / 2] * w;
        a[i + j] = u + v;
        a[i + j + d / 2] = u - v;
        w *= wd;
      }
    }
  }
  if (direction) {
    for (long long i = 0; i < n; ++i) a[i] /= n;
  }
}
void multiply(vector<long long>& a, vector<long long>& b,
              vector<long long>& c) {
  vector<complex<double> > A(a.begin(), a.end()), B(b.begin(), b.end());
  long long n = 1;
  while (n < max((long long)a.size(), (long long)b.size())) n = n << 1;
  n = n << 1;
  A.resize(n), B.resize(n);
  fft(A, false);
  fft(B, false);
  for (long long i = 0; i < n; i++) {
    A[i] = A[i] * B[i];
  }
  fft(A, true);
  c.resize(n);
  for (long long i = 0; i < n; i++) c[i] = (long long)(A[i].real() + 0.5);
  for (long long i = 0; i < n; i++) c[i] = (c[i] > 0);
}
vector<long long> fftexpo(vector<long long> a, long long n) {
  vector<long long> res;
  res.push_back(1);
  while (n != 0) {
    if (n & 1) multiply(res, a, res);
    multiply(a, a, a);
    n /= 2;
  }
  return res;
}
long long solve() {
  long long n, k;
  cin >> n >> k;
  vector<long long> a(1005);
  for (long long i = 1; i < n + 1; i++) {
    long long t;
    cin >> t;
    a[t] = 1;
  }
  vector<long long> res = fftexpo(a, k);
  for (long long i = 0; i < (long long)res.size(); i++) {
    if (res[i] > 0) cout << i << " ";
  }
  return 0;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
