#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target("avx")
#pragma GCC target("sse,sse2,sse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
long long read() {
  long long x = 0;
  bool q = 0;
  char c = getchar();
  while (!isdigit(c)) q |= (c == '-'), c = getchar();
  while (isdigit(c)) x = (x << 1) + (x << 3) + c - '0', c = getchar();
  return q ? -x : x;
}
void print(long long x, char q = '\n') {
  if (x < 0) putchar('-'), x = -x;
  if (x == 0) putchar('0');
  stack<char> s;
  s.push(q);
  while (x > 0) s.push(x % 10 + '0'), x /= 10;
  while (!s.empty()) putchar(s.top()), s.pop();
}
string read_s() {
  string s;
  char c = getchar();
  while (c == ' ' || c == '\t' || c == '\n') c = getchar();
  while (c != ' ' && c != '\t' && c != '\n') s += c, c = getchar();
  return s;
}
void print_s(string s, char q = '\n') {
  for (char c : s) putchar(c);
  putchar(q);
}
char read_c() {
  char c = getchar();
  while (c == ' ' || c == '\t' || c == '\n') c = getchar();
  return c;
}
const int mod = 998244353;
const int root = 15311432;
const int root_1 = 469870224;
const int root_pw = 1 << 23;
long long pow(long long a, long long m = mod - 2) {
  long long ret = 1;
  while (m) {
    if (m & 1) ret = (ret * a) % mod;
    a = (a * a) % mod;
    m >>= 1;
  }
  return ret;
}
void fft(vector<int> &a, bool inv = 0) {
  int n = a.size();
  for (int i = 1, j = 0; i < n; i++) {
    int c = n >> 1;
    for (; j >= c; c >>= 1) j -= c;
    j += c;
    if (i < j) swap(a[i], a[j]);
  }
  for (int len = 2; len <= n; len <<= 1) {
    int wlen = inv ? root_1 : root;
    for (int i = len; i < root_pw; i <<= 1) wlen = (1LL * wlen * wlen) % mod;
    for (int i = 0; i < n; i += len) {
      int w = 1;
      for (int j = 0; j < (len >> 1); j++) {
        int u = a[i + j], v = (a[i + j + (len >> 1)] * 1LL * w) % mod;
        a[i + j] = u + v < mod ? u + v : u + v - mod;
        a[i + j + (len >> 1)] = u - v >= 0 ? u - v : u - v + mod;
        w = (w * 1LL * wlen) % mod;
      }
    }
  }
  if (inv) {
    int nrev = pow(n);
    for (int i = 0; i < n; i++) a[i] = (a[i] * 1LL * nrev) % mod;
  }
}
vector<int> FFT(const vector<int> a, const vector<int> b) {
  vector<int> fa(a.begin(), a.end()), fb(b.begin(), b.end());
  int n = 1;
  while (n < (int)max(a.size(), b.size())) n <<= 1;
  n <<= 1;
  fa.resize(n), fb.resize(n);
  fft(fa);
  fft(fb);
  for (int i = 0; i < n; i++) fa[i] = (1LL * fa[i] * fb[i]) % mod;
  fft(fa, 1);
  for (int i = 0; i < n; i++)
    if (fa[i] != 0) fa[i] = 1;
  return fa;
}
int main() {
  int n = read(), m = read();
  vector<int> a(1001, 0);
  for (int i = 0; i < n; i++) a[read()] = 1;
  vector<int> ans;
  ans.push_back(1);
  while (m) {
    if (m & 1) ans = FFT(ans, a);
    a = FFT(a, a);
    m >>= 1;
  }
  for (int i = 1; i < ans.size(); i++)
    if (ans[i]) print(i, ' ');
}
