#include <bits/stdc++.h>
using namespace std;
int rev[(1 << 21)], mlgn;
double omega[(1 << 21)][2];
double FA[(1 << 21)][2], FB[(1 << 21)][2];
inline void mult(double A[2], double B[2], double C[2]) {
  C[0] = A[0] * B[0] - A[1] * B[1];
  C[1] = A[0] * B[1] + A[1] * B[0];
}
void calc_rev(int n = (1 << 21)) {
  while ((1 << mlgn) < n) mlgn++;
  int lvl = 1, mx = (1 << mlgn);
  while (lvl < mx) {
    int j = 0, sg = 0;
    for (int i = 0; i < mx; i++) {
      rev[i] = (rev[i] << 1) | sg;
      j++;
      if (j == lvl) j = 0, sg ^= 1;
    }
    lvl <<= 1;
  }
}
void fft(double X[(1 << 21)][2], int n, bool invert) {
  int lgn = 0;
  while ((1 << lgn) != n) lgn++;
  for (int i = 0; i < (n); i++)
    if (i < rev[i << (mlgn - lgn)])
      swap(X[i][0], X[rev[i << (mlgn - lgn)]][0]),
          swap(X[i][1], X[rev[i << (mlgn - lgn)]][1]);
  double ang = (2.0 * M_PI / n) * (invert ? -1.0 : 1.0);
  for (int i = 0; i < (n); i++)
    omega[i][0] = cos(ang * i), omega[i][1] = sin(ang * i);
  for (int len = 2; len <= n; len <<= 1) {
    int fact = n / len;
    int len2 = len >> 1;
    for (int i = 0; i < n; i += len)
      for (int j = 0; j < (len2); j++) {
        double u[2], v[2];
        u[0] = X[i + j][0], u[1] = X[i + j][1];
        mult(X[i + j + len2], omega[j * fact], v);
        X[i + j][0] = u[0] + v[0], X[i + j][1] = u[1] + v[1];
        X[i + j + len2][0] = u[0] - v[0], X[i + j + len2][1] = u[1] - v[1];
      }
  }
  if (invert)
    for (int i = 0; i < (n); i++) X[i][0] /= n, X[i][1] /= n;
}
int multiply(int A[(1 << 21)], int B[(1 << 21)], int n1, int n2,
             int ret[(1 << 21)]) {
  for (int i = 0; i < (n1); i++) FA[i][0] = (double)A[i], FA[i][1] = 0.0;
  for (int i = 0; i < (n2); i++) FB[i][0] = (double)B[i], FB[i][1] = 0.0;
  int n = 1;
  while (n < max(n1, n2)) n <<= 1;
  n <<= 1;
  for (int i = (n1); i < (n); i++) FA[i][0] = FA[i][1] = 0.0;
  for (int i = (n2); i < (n); i++) FB[i][0] = FB[i][1] = 0.0;
  fft(FA, n, false);
  fft(FB, n, false);
  double tmp[2];
  for (int i = 0; i < (n); i++) {
    mult(FA[i], FB[i], tmp);
    FA[i][0] = tmp[0], FA[i][1] = tmp[1];
  }
  fft(FA, n, true);
  int mx = 1;
  for (int i = 0; i < (n); i++) {
    ret[i] = (int)(FA[i][0] + 0.5);
    ret[i] = (ret[i] > 0);
    if (ret[i]) mx = i + 1;
  }
  return mx;
}
int N, K;
int a[(1 << 21)], b[(1 << 21)];
void bigmodFFT(int x[(1 << 21)], int ret[(1 << 21)], int pow, int n) {
  int n1 = 1;
  ret[0] = 1;
  while (pow > 0) {
    if (pow & 1) n1 = multiply(ret, x, n1, n, ret);
    pow >>= 1;
    if (!pow) break;
    n = multiply(x, x, n, n, x);
  }
}
int main() {
  int n = 0;
  scanf("%d%d", &N, &K);
  for (int i = 0; i < (N); i++) {
    int x;
    scanf("%d", &x);
    a[x] = 1;
    n = max(n, x + 1);
  }
  calc_rev();
  bigmodFFT(a, b, K, n);
  bool sp = false;
  for (int i = 0; i < ((1 << 21)); i++)
    if (b[i]) {
      if (sp) printf(" ");
      printf("%d", i);
      sp = true;
    }
  return 0;
}
