#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 50;
int mod, pos[N], lim, tim;
int a[N], b[N];
inline int add(int a, int b) { return a + b >= mod ? a + b - mod : a + b; }
inline int dec(int a, int b) { return a >= b ? a - b : a - b + mod; }
inline int mul(int a, int b) { return (long long)a * b % mod; }
inline int ksm(int a, int p) {
  int ret = 1;
  for (; p; p >>= 1, a = mul(a, a))
    if (p & 1) ret = mul(ret, a);
  return ret;
}
inline void init(int &n) {
  lim = 1, tim = 0;
  while (lim <= n) {
    lim <<= 1;
    tim++;
  }
  for (int i = 0; i < lim; i++)
    pos[i] = (pos[i >> 1] >> 1) | ((i & 1) << (tim - 1));
}
inline void ntt(int a[], const int &type) {
  for (int i = 0; i < lim; ++i)
    if (i < pos[i]) swap(a[i], a[pos[i]]);
  int wn, w, a0, a1;
  for (int mid = 1, typ = type == 1 ? 3 : (mod + 1) / 3, mult = (mod - 1) / 2;
       mid < lim; mid <<= 1, mult >>= 1) {
    wn = ksm(typ, mult);
    for (int j = 0, len = mid << 1; j < lim; j += len) {
      w = 1;
      for (int k = 0; k < mid; ++k, w = mul(w, wn)) {
        a0 = a[j + k], a1 = mul(w, a[j + k + mid]);
        a[j + k] = add(a0, a1), a[j + k + mid] = dec(a0, a1);
      }
    }
  }
  if (type == -1)
    for (int i = 0, inv = ksm(lim, mod - 2); i < lim; ++i)
      a[i] = mul(a[i], inv);
}
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  memset(a, 0, sizeof(a));
  memset(b, 0, sizeof(b));
  int maxn = 0;
  for (int i = 1; i <= n; i++) {
    int val;
    scanf("%d", &val);
    maxn = max(maxn, val);
    a[val] = b[val] = 1;
  }
  maxn = maxn * k;
  init(maxn);
  mod = 998244353;
  ntt(a, 1);
  for (int i = 0; i < lim; i++) a[i] = ksm(a[i], k);
  ntt(a, -1);
  mod = 1004535809;
  ntt(b, 1);
  for (int i = 0; i < lim; i++) b[i] = ksm(b[i], k);
  ntt(b, -1);
  for (int i = 0; i < lim; i++) {
    if (a[i] != 0 || b[i] != 0) {
      printf("%d ", i);
    }
  }
  printf("\n");
}
