#include <bits/stdc++.h>
#pragma GCC optimize("-O2")
using namespace std;
void err(istream_iterator<string> it) { cerr << endl; }
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << "\t";
  err(++it, args...);
}
template <typename T1, typename T2>
ostream& operator<<(ostream& c, pair<T1, T2>& v) {
  c << "(" << v.first << "," << v.second << ")";
  return c;
}
template <template <class...> class TT, class... T>
ostream& operator<<(ostream& out, TT<T...>& c) {
  out << "{ ";
  for (auto& x : c) out << x << " ";
  out << "}";
  return out;
}
int t, n, m, k, x, y, w;
const long double PI = acos(-1);
const int MOD = 998244353, LIM = 1e6 + 5;
const long double EPS = 1e-9;
long long power(long long a, long long p) {
  if (p == 0) return 1;
  long long x = power(a, p / 2);
  x = (x * x) % MOD;
  if (p % 2 == 1) x = (x * a) % MOD;
  return x;
}
long long inverse(long long a, long long x) { return power(a, MOD - 2); }
long long root_pw = 1LL << 23;
long long root = 15311432;
long long root_1 = inverse(root, MOD);
const int mod = MOD;
void ntt(vector<long long>& a, bool invert) {
  int n = 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 len = 2; len <= n; len <<= 1) {
    long long wlen = invert ? root_1 : root;
    for (long long i = len; i < root_pw; i <<= 1)
      wlen = (long long)(1LL * wlen * wlen % mod);
    for (long long i = 0; i < n; i += len) {
      long long w = 1;
      for (long long j = 0; j < len / 2; j++) {
        long long u = a[i + j],
                  v = (long long)(1LL * a[i + j + len / 2] * w % mod);
        a[i + j] = u + v < mod ? u + v : u + v - mod;
        a[i + j + len / 2] = u - v >= 0 ? u - v : u - v + mod;
        w = (long long)(1LL * w * wlen % mod);
      }
    }
  }
  if (invert) {
    long long n_1 = inverse(n, mod);
    for (long long& x : a) x = (long long)(1LL * x * n_1 % mod);
  }
}
vector<long long> multiply(vector<long long> const& a,
                           vector<long long> const& b) {
  vector<long long> fa(a.begin(), a.end()), fb(b.begin(), b.end());
  long long n = 1;
  while (n < a.size() + b.size()) n <<= 1;
  fa.resize(n);
  fb.resize(n);
  ntt(fa, false);
  ntt(fb, false);
  for (int i = 0; i < n; i++) {
    fa[i] = fa[i] * (long long)fb[i] % mod;
  }
  ntt(fa, true);
  vector<long long> result(n);
  for (int i = 0; i < n; i++) result[i] = (fa[i] > 0) ? 1 : 0;
  return result;
}
vector<long long> power1(vector<long long>& a, long long p) {
  vector<long long> res;
  res.push_back(1);
  while (p) {
    if (p & 1) res = multiply(res, a);
    a = multiply(a, a);
    p /= 2;
  }
  return res;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  vector<long long> a(1001, 0);
  for (int i = 0; i < n; ++i) {
    cin >> x;
    a[x] = 1;
  }
  vector<long long> b = power1(a, k);
  for (int i = 0; i < b.size(); ++i)
    if (b[i] > 0) cout << i << " ";
  return 0;
}
