#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("avx")
#pragma GCC optimize("unroll-loops")
namespace Polynomial {
inline void add(unsigned int* a, unsigned int* b, unsigned int k) {
  for (unsigned int i = 0; i < k; ++i) {
    a[i] += b[i];
  }
}
inline void sub(unsigned int* a, unsigned int* b, unsigned int k) {
  for (unsigned int i = 0; i < k; ++i) {
    a[i] -= b[i];
  }
}
void karatsuba(unsigned int* a, unsigned int* b, unsigned int* c,
               unsigned int n) {
  if (n <= 32) {
    for (unsigned int i = 0; i < n; ++i) {
      for (unsigned int j = 0; j < n; ++j) {
        c[i + j] += a[i] * b[j];
      }
    }
  } else {
    unsigned int k = n / 2;
    unsigned int l[k], r[k], t[n], p1[n], p2[n];
    std::fill(l, l + k, 0);
    std::fill(r, r + k, 0);
    std::fill(t, t + n, 0);
    std::fill(p1, p1 + n, 0);
    std::fill(p2, p2 + n, 0);
    for (unsigned int i = 0; i < k; i++) {
      l[i] = a[i] + a[i + k];
      r[i] = b[i] + b[i + k];
    }
    karatsuba(l, r, t, k);
    karatsuba(a, b, p1, k);
    karatsuba(a + k, b + k, p2, k);
    add(c, p1, n);
    add(c + n, p2, n);
    add(c + k, t, n);
    sub(c + k, p1, n);
    sub(c + k, p2, n);
  }
}
inline void mul(unsigned int* a, unsigned int* b, unsigned int n) {
  unsigned int ta[n], tb[n];
  std::memcpy(ta, a, sizeof ta);
  std::memcpy(tb, b, sizeof tb);
  std::memset(a, 0, sizeof ta);
  karatsuba(ta, tb, a, n);
}
}  // namespace Polynomial
const unsigned int maxLen = (1 << 20);
unsigned int a[maxLen], res[maxLen];
void binpow(unsigned int k) {
  res[0] = 1;
  unsigned int l = (1 << 10);
  while (k > 1) {
    if (k % 2 == 1) {
      Polynomial::mul(res, a, l);
    }
    Polynomial::mul(a, a, l);
    k /= 2;
    l *= 2;
  }
  Polynomial::mul(res, a, l);
}
int main(int argc, char const* argv[]) {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(nullptr);
  unsigned int n, k;
  std::cin >> n >> k;
  for (unsigned int i = 0; i < n; i++) {
    unsigned int x;
    std::cin >> x;
    if (a[x] == 0) a[x] = 1;
  }
  binpow(k);
  for (unsigned int i = 0; i < maxLen; i++) {
    if (res[i] > 0) std::cout << i << ' ';
  }
  std::cout << std::endl;
  return 0;
}
