#include <bits/stdc++.h>
using namespace std;
inline int readChar();
template <class T = int>
inline T readInt();
template <class T>
inline void writeInt(T first, char end = 0);
inline void writeChar(int first);
inline void writeWord(const char *s);
static const int buf_size = 4096;
inline int getChar() {
  static char buf[buf_size];
  static int len = 0, pos = 0;
  if (pos == len) pos = 0, len = fread(buf, 1, buf_size, stdin);
  if (pos == len) return -1;
  return buf[pos++];
}
inline int readChar() {
  int c = getChar();
  while (c <= 32) c = getChar();
  return c;
}
template <class T>
inline T readInt() {
  int s = 1, c = readChar();
  T first = 0;
  if (c == '-') s = -1, c = getChar();
  while ('0' <= c && c <= '9') first = first * 10 + c - '0', c = getChar();
  return s == 1 ? first : -first;
}
static int write_pos = 0;
static char write_buf[buf_size];
inline void writeChar(int first) {
  if (write_pos == buf_size)
    fwrite(write_buf, 1, buf_size, stdout), write_pos = 0;
  write_buf[write_pos++] = first;
}
template <class T>
inline void writeInt(T first, char end) {
  if (first < 0) writeChar('-'), first = -first;
  char s[24];
  int n = 0;
  while (first || !n) s[n++] = '0' + first % 10, first /= 10;
  while (n--) writeChar(s[n]);
  if (end) writeChar(end);
}
inline void writeWord(const char *s) {
  while (*s) writeChar(*s++);
}
struct Flusher {
  ~Flusher() {
    if (write_pos) fwrite(write_buf, 1, write_pos, stdout), write_pos = 0;
  }
} flusher;
const auto pi = acos(-1);
int Log[1 << 21];
const int N = 1 << 20;
void fft(vector<complex<double> > &s, int n, int ok) {
  const int lg = Log[n] - 1;
  assert((1 << Log[n]) == n);
  auto rev = [&](int first) {
    int ans = 0;
    for (int k = 0; k <= lg; ++k)
      if ((first >> k) & 1) ans += 1 << (lg - k);
    return ans;
  };
  for (int i = 0; i < n; ++i)
    if (i < rev(i)) swap(s[i], s[rev(i)]);
  for (int len = 2; len <= n; len <<= 1) {
    const auto ang = 2 * pi * ok / len;
    const auto W = complex<double>(cos(ang), sin(ang));
    for (int i = 0; i < n; i += len) {
      complex<double> w = complex<double>(1, 0);
      for (int j = 0; j < len / 2; ++j) {
        const complex<double> vv = s[i + j + (len / 2)] * w;
        const complex<double> uu = s[i + j];
        s[i + j] = uu + vv;
        s[i + j + (len / 2)] = uu - vv;
        w *= W;
      }
    }
  }
  if (ok == -1)
    for (int i = 0; i < n; ++i) s[i] /= n;
}
void FFT(const vector<bool> &a, const vector<bool> &b, vector<bool> &c) {
  vector<complex<double> > A(a.begin(), a.end()), B(b.begin(), b.end());
  int n = max(a.size(), b.size()) * 2;
  A.resize(n);
  B.resize(n);
  fft(A, n, 1);
  fft(B, n, 1);
  for (int i = 0; i < n; ++i) A[i] *= B[i];
  fft(A, n, -1);
  c.clear();
  for (int i = 0; i < n; ++i) c.push_back(!!(int)(A[i].real() + 0.5));
}
int main(void) {
  srand(time(0));
  cout << fixed << setprecision(7);
  cerr << fixed << setprecision(7);
  int n, k;
  for (int i = 2; i < (1 << 21); ++i) Log[i] = Log[i / 2] + 1;
  n = readInt();
  k = readInt();
  vector<bool> s(1024, 0);
  while (n--) {
    int v = readInt();
    s[v] = 1;
  }
  vector<bool> ans;
  ans.push_back(1);
  while (k) {
    if (k & 1) FFT(ans, s, ans);
    FFT(s, s, s);
    k /= 2;
  }
  n = ans.size();
  int cnt = accumulate(ans.begin(), ans.end(), 0);
  for (int i = 0; i < n; ++i)
    if (ans[i]) writeInt(i, " \n"[(--cnt) == 0]);
  cerr << "Time elapsed :" << clock() * 1000.0 / CLOCKS_PER_SEC << " ms"
       << '\n';
  return 0;
}
