#include <bits/stdc++.h>
void print_vector(std::vector<int> x);
long long int fexp(long long int x, long long int e, long long int mod) {
  long long int ans = 1;
  x %= mod;
  while (e) {
    if (e & 1) ans = (ans * x) % mod;
    x = (x * x) % mod;
    e >>= 1;
  }
  return ans;
}
bool test(long long int x, long long int p) {
  long long int m = p - 1;
  for (int i = 2; i * i <= m; ++i)
    if (!(m % i)) {
      if (fexp(x, i, p) == 1) return false;
      if (fexp(x, m / i, p) == 1) return false;
    }
  return true;
}
long long int search(long long int p) {
  for (long long int i = p - 1; i >= 2; --i)
    if (test(i, p)) return i;
  return -1;
}
std::map<int, int> roots;
int get_root(int p) {
  if (roots[p])
    return roots[p];
  else {
    roots[p] = search(p);
    std::cout << "found root " << roots[p] << " for mod " << p << '\n';
    return roots[p];
  }
}
std::vector<int> fft(std::vector<int> x, int mod, bool inv = false) {
  int gen = get_root(mod);
  if (inv) gen = fexp(gen, mod - 2, mod);
  int n = x.size();
  for (int i = 0; i < n; i++) {
    int to = 0, on = i, bits = n - 1;
    while (bits) {
      to = (to << 1) | (on & 1);
      on >>= 1;
      bits >>= 1;
    }
    if (i < to) std::swap(x[i], x[to]);
  }
  for (int len = 1; len < n; len <<= 1) {
    int root = fexp(gen, (mod - 1) / (2 * len), mod);
    for (int i = 0; i < n; i += len << 1) {
      int cur_root = 1;
      for (int j = 0; j < len; j++) {
        int a = x[i + j];
        int b = x[i + j + len];
        int c = (long long int)cur_root * b % mod;
        x[i + j] = (a + c) % mod;
        x[i + j + len] = ((a - c + mod) % mod);
        cur_root = (long long int)cur_root * root % mod;
      }
    }
  }
  if (inv) {
    int rev = fexp(n, mod - 2, mod);
    for (int i = 0; i < n; i++) x[i] = (long long int)x[i] * rev % mod;
  }
  return x;
}
std::vector<int> polynomial_fexp(std::vector<int> base, long long int e) {
  std::vector<int> ans(base.size(), 0);
  std::vector<int> mods;
  mods.push_back(754974721);
  std::vector<int> A;
  A.resize(mods.size());
  for (int i = 0; i < mods.size(); i++) {
    A = fft(base, mods[i]);
    for (int j = 0; j < base.size(); j++) A[j] = fexp(A[j], e, mods[i]);
    A = fft(A, mods[i], true);
    for (int j = 0; j < base.size(); j++) {
      if (A[j]) ans[j] = 1;
    }
  }
  return ans;
}
void print_vector(std::vector<int> x) {
  for (int i = 0; i < x.size(); i++) std::cout << x[i] << ' ';
  std::cout << '\n';
}
int main() {
  int n, k;
  roots[754974721] = 754974710;
  roots[469762049] = 469762046;
  while (std::cin >> n >> k) {
    int N = 1;
    while (N < k * 1000) N <<= 1;
    std::vector<int> A(N, 0);
    for (int i = 0; i < n; i++) {
      int temp;
      scanf("%i", &temp);
      A[temp] = 1;
    }
    A = polynomial_fexp(A, k);
    int count = 0;
    for (int i = 0; i < N; i++) {
      if (A[i]) {
        if (count) std::cout << " ";
        count++;
        std::cout << i;
      }
    }
    std::cout << '\n';
  }
}
