#include <bits/stdc++.h>
using namespace std;
using LL = long long;
int modExp(int a, int n, int p) {
  int ret = 1;
  for (; n; n >>= 1, a = 1LL * a * a % p)
    if (n & 1) ret = 1LL * ret * a % p;
  return ret;
}
namespace FFT {
const int M = 1 << 21;
const int P = 998244353;
int IM;
int a1[M], b1[M], p[M + 1], rev[M];
void NTT(int *B, int *A, int N, int D) {
  for (int j = 0, d = __builtin_ctz(M / N); j < N; j++) A[rev[j] >> d] = B[j];
  for (int n = 1, m = M / 2 * D; n < N; m /= 2, n <<= 1) {
    for (int i = 0; i < N; i += n << 1) {
      int *w = (D == 1 ? p : p + M), *a = A + i, *b = A + i + n;
      for (int j = 0; j < n; j++, a++, b++, w += m) {
        int x = 1LL * *w * *b % P;
        *b = (*a + P - x) % P;
        *a = (*a + x) % P;
      }
    }
  }
}
void init() {
  int fac[10] = {0}, n = 0;
  for (int Q = P - 1, q = 2; Q > 1; q++)
    if (Q % q == 0) {
      fac[n++] = q;
      while (Q % q == 0) Q /= q;
    }
  int G = 2;
  while (1) {
    int flg = 1;
    for (int i = 0; i < n; i++)
      if (modExp(G, P / fac[i], P) == 1) flg = 0;
    if (flg) break;
    G++;
  }
  G = modExp(G, P / M, P);
  for (int i = 0; i <= M; i++) p[i] = (i == 0 ? 1 : (LL)p[i - 1] * G % P);
  for (int i = 0, j = 1; j < M; j++) {
    for (int k = M >> 1; (i ^= k) < k; k >>= 1)
      ;
    rev[j] = i;
  }
  IM = modExp(M, P - 2, P);
}
void conv(int *a, int *b, int *c, int N, int P) {
  if (N <= 64) {
    static int temp[64];
    memset(temp, 0, sizeof(int) * N);
    for (int i = 0; i < N; i++) {
      for (int j = 0; j < N - i; j++)
        temp[i + j] = (temp[i + j] + 1LL * a[i] * b[j]) % P;
      for (int j = N - i; j < N; j++)
        temp[i + j - N] = (temp[i + j - N] + 1LL * a[i] * b[j]) % P;
    }
    memcpy(c, temp, sizeof(int) * N);
    return;
  }
  NTT(a, a1, N, 1);
  NTT(b, b1, N, 1);
  int R = IM * 1LL * M / N % P;
  for (int i = 0; i < N; i++) a1[i] = (LL)a1[i] * b1[i] % P * R % P;
  NTT(a1, c, N, -1);
}
void conv(int *a, int *b, int N, int P) {
  if (N <= 64) {
    static int temp[64];
    memset(temp, 0, sizeof(int) * N);
    for (int i = 0; i < N; i++) {
      for (int j = 0; j < N - i; j++)
        temp[i + j] = (temp[i + j] + 1LL * a[i] * a[j]) % P;
      for (int j = N - i; j < N; j++)
        temp[i + j - N] = (temp[i + j - N] + 1LL * a[i] * a[j]) % P;
    }
    memcpy(b, temp, sizeof(int) * N);
    return;
  }
  NTT(a, a1, N, 1);
  int R = modExp(N, P - 2, P);
  for (int i = 0; i < N; i++) a1[i] = (LL)a1[i] * a1[i] % P * R % P;
  NTT(a1, b, N, -1);
}
};  // namespace FFT
const int N = 1 << 10;
int a[N * N * 2], b[N * N * 2], an, bn;
void polyPow(int *a, int an, int n) {
  b[0] = 1;
  bn = 1;
  for (; n; n >>= 1) {
    if (n & 1) {
      int m = 32 - __builtin_clz(an + bn - 1);
      m = 1 << m;
      FFT::conv(a, b, b, m, FFT::P);
      bn = an + bn - 1;
      for (int i = 0; i < bn; i++) b[i] = !!b[i];
    }
    int m = 32 - __builtin_clz(an + an - 1);
    m = 1 << m;
    FFT::conv(a, a, m, FFT::P);
    an = an + an - 1;
    for (int i = 0; i < an; i++) a[i] = !!a[i];
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  FFT::init();
  int n, k;
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    int tmp;
    cin >> tmp;
    a[tmp] = 1;
    an = max(an, tmp);
  }
  an++;
  polyPow(a, an, k);
  for (int i = 0; i < bn; i++)
    if (b[i]) cout << i << " ";
  return 0;
}
