#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
inline void smin(T &a, U b) {
  if (a > b) a = b;
}
template <typename T, typename U>
inline void smax(T &a, U b) {
  if (a < b) a = b;
}
inline void gn(int &first) {
  char c, sg = 0;
  while (c = getchar(), (c > '9' || c < '0') && c != '-')
    ;
  for ((c == '-' ? sg = 1, c = getchar() : 0), first = 0; c >= '0' && c <= '9';
       c = getchar())
    first = (first << 1) + (first << 3) + c - '0';
  if (sg) first = -first;
}
inline void gn(long long &first) {
  char c, sg = 0;
  while (c = getchar(), (c > '9' || c < '0') && c != '-')
    ;
  for ((c == '-' ? sg = 1, c = getchar() : 0), first = 0; c >= '0' && c <= '9';
       c = getchar())
    first = (first << 1) + (first << 3) + c - '0';
  if (sg) first = -first;
}
inline void gn(double &first) { scanf("%lf", &first); }
inline void newline() { putchar('\n'); }
inline void sp() { putchar(' '); }
template <class T>
inline void print(T first) {
  if (first < 0) {
    putchar('-');
    return print(-first);
  }
  if (first < 10) {
    putchar('0' + first);
    return;
  }
  print(first / 10);
  putchar(first % 10 + '0');
}
int power(int a, int b, int m, int ans = 1) {
  for (; b; b >>= 1, a = 1LL * a * a % m)
    if (b & 1) ans = 1LL * ans * a % m;
  return ans;
}
namespace FFT {
const int mod = 998244353;
const int root = 31;
const int root_1 = 128805723;
const int root_pw = 1 << 23;
int mPow(int a, int first) {
  int ret = 1;
  while (first > 0) {
    if (first & 1) ret = 1LL * ret * a % mod;
    a = 1LL * a * a % mod;
    first >>= 1;
  }
  return ret;
}
void fft(vector<int> &a, bool invert) {
  int n = a.size();
  int PW = invert ? root_1 : root;
  for (int i = n; i < root_pw; i <<= 1) PW = 1LL * PW * PW % mod;
  for (int m = n, h; h = m / 2, m >= 2; PW = 1LL * PW * PW % mod, m = h) {
    for (int i = 0, w = 1; i < h; ++i, w = 1LL * w * PW % mod)
      for (int j = i; j < n; j += m) {
        int k = j + h, first = (a[j] - a[k] + mod) % mod;
        a[j] += a[k];
        a[j] %= mod;
        a[k] = 1LL * w * first % mod;
      }
  }
  for (int i = 0, j = 1; j < n - 1; ++j) {
    for (int k = n / 2; k > (i ^= k); k /= 2)
      ;
    if (j < i) swap(a[i], a[j]);
  }
  if (invert) {
    int rev = mPow(n, mod - 2);
    for (int i = 0; i < n; ++i) a[i] = 1LL * a[i] * rev % mod;
    for (int i = 0; i < n; i++) a[i] = a[i] > 0;
  }
}
vector<int> multiply(const vector<int> &a, const vector<int> &b) {
  int n = max(a.size(), b.size());
  vector<int> na = a, nb = b;
  na.resize(2 * n);
  nb.resize(2 * n);
  fft(na, false);
  fft(nb, false);
  for (int i = 0; i < 2 * n; ++i) na[i] = 1LL * na[i] * nb[i] % mod;
  fft(na, true);
  return na;
}
};  // namespace FFT
int main() {
  int n, k, u;
  cin >> n >> k;
  vector<int> a(1024, 0);
  for (int i = 0; i < n; i++) scanf("%d", &u), a[u] = 1;
  vector<int> ans(1, 1);
  while (k) {
    if (k & 1) ans = FFT::multiply(ans, a);
    a = FFT::multiply(a, a);
    k >>= 1;
  }
  for (int i = 1; i < ans.size(); i++)
    if (ans[i]) print(i), sp();
  return 0;
}
