#include <bits/stdc++.h>
using namespace std;
const int N = 1005;
const int M = 1 << 21;
const double PI = acos(-1.0);
int n, kk, a[N], pos[M];
int tot;
long long sum;
struct comp {
  double r, i;
  comp operator+(const comp& t) const { return (comp){r + t.r, i + t.i}; }
  comp operator-(const comp& t) const { return (comp){r - t.r, i - t.i}; }
  comp operator*(const comp& t) const {
    return (comp){r * t.r - i * t.i, r * t.i + i * t.r};
  }
} f[M], c[M], cc[M];
void fft(comp a[], int n, int t) {
  ++tot;
  clock_t now = clock();
  for (int i = 1; i < n - 1; ++i)
    if (pos[i] > i) swap(a[i], a[pos[i]]);
  for (int d = 1; d < n; d <<= 1) {
    double o = PI * t / d;
    comp _w = (comp){cos(o), sin(o)};
    for (int i = 0; i < n; i += d + d) {
      comp w = (comp){1, 0};
      for (int j = 0; j < d; ++j) {
        comp &A = a[i + j], &B = a[i + j + d], C = w * B;
        B = A - C;
        A = A + C;
        w = w * _w;
      }
    }
  }
  if (t == -1)
    for (int i = 0; i < n; ++i) a[i].r /= n;
  clock_t end = clock();
  sum += end - now;
}
int main() {
  int i, j;
  scanf("%d%d", &n, &kk);
  for (i = 1; i <= n; ++i) {
    scanf("%d", a + i);
    f[a[i]].r = 1;
    c[a[i]].r = 1;
  }
  int lf = 1000;
  int lc = 1000;
  for (--kk; kk; kk >>= 1) {
    if (kk & 1) {
      lf = min(lf + lc, M);
      int len = 1;
      for (; len < lf; len <<= 1)
        ;
      j = __builtin_ctz(len) - 1;
      for (i = 0; i < len; ++i) pos[i] = pos[i >> 1] >> 1 | ((i & 1) << j);
      for (i = 0; i < len; ++i) cc[i] = c[i];
      fft(f, len, 1);
      fft(cc, len, 1);
      for (i = 0; i < len; ++i) f[i] = f[i] * cc[i];
      fft(f, len, -1);
      for (i = 0; i < len; ++i) f[i].r = f[i].r < 0.5 ? 0.0 : 1.0, f[i].i = 0;
    }
    lc = min(lc * 2, M);
    int len = 1;
    for (; len < lc; len <<= 1)
      ;
    j = __builtin_ctz(len) - 1;
    for (i = 0; i < len; ++i) pos[i] = pos[i >> 1] >> 1 | ((i & 1) << j);
    fft(c, len, 1);
    for (i = 0; i < len; ++i) c[i] = c[i] * c[i];
    fft(c, len, -1);
    for (i = 0; i < len; ++i) c[i].r = c[i].r < 0.5 ? 0.0 : 1.0, c[i].i = 0;
  }
  for (i = 0; i <= 1000000; ++i)
    if (f[i].r > 0.5) printf("%d ", i);
  return 0;
}
