#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 = 469762049;
const long double EPS = 1e-9;
inline long long powm(long long x, long long pw, long long Mod = MOD) {
  x %= Mod;
  long long res = 1;
  while (pw) {
    if (pw & 1LL) res = ((res * x)) % Mod;
    pw >>= 1;
    x = ((x * x)) % Mod;
  }
  return res;
}
inline long long inv(long long x, long long Mod = MOD) {
  return powm(x, Mod - 2, Mod);
}
const int mod = MOD;
long long root_pw = 1LL << 20;
long long primitive_root = 3;
long long root = powm(primitive_root, (mod - 1) / root_pw);
long long root_1 = inv(root, 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 = inv(n, mod);
    for (long long& x : a) x = (long long)(1LL * x * n_1 % mod);
  }
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  vector<long long> a((1 << 20), 0);
  for (int i = 0; i < n; ++i) {
    cin >> x;
    a[x] = 1;
  }
  ntt(a, false);
  for (int i = 0; i < (1 << 20); i++) a[i] = powm(a[i], k);
  ntt(a, true);
  for (int i = 0; i < a.size(); ++i)
    if (a[i] > 0) cout << i << " ";
  return 0;
}
