#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
const int N = 2000005;
const int mod = 998244353;
const int root = 267099868;
const int root_1 = 382752275;
const int root_pw = 1 << 22;
inline int mul(int x, int y) {
  long long int x1 = x;
  long long int y1 = y;
  long long int m = mod;
  x1 = (x1 * y1) % m;
  x = x1;
  return x;
}
inline int pow(int x, int y, int p) {
  int ans = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) ans = mul(ans, x);
    y = y >> 1;
    x = mul(x, x);
  }
  return ans;
}
inline int invmod(int x, int p) { return pow(x, p - 2, p); }
inline void fft(vector<int> &a, bool invert) {
  int n = a.size();
  for (int i = 1, j = 0; i < n; i++) {
    int bit = n >> 1;
    for (; j & bit; bit >>= 1) j ^= bit;
    j ^= bit;
    if (i < j) swap(a[i], a[j]);
  }
  for (int len = 2; len <= n; len <<= 1) {
    int wlen = invert ? root : root_1;
    for (int i = len; i < root_pw; i <<= 1) wlen = mul(wlen, wlen);
    for (int i = 0; i < n; i += len) {
      int w = 1;
      for (int j = 0; j < len / 2; j++) {
        int u = a[i + j], v = mul(w, a[i + j + len / 2]);
        a[i + j] = u + v < mod ? u + v : u + v - mod;
        a[i + j + len / 2] = u - v >= 0 ? u - v : u - v + mod;
        w = mul(w, wlen);
      }
    }
  }
  if (invert) {
    int n_1 = invmod(n, mod);
    for (int i = 0; i < n; i++) a[i] = mul(a[i], n_1);
  }
}
inline void multiply(const vector<int> &a, const vector<int> &b,
                     vector<int> &res) {
  vector<int> fa(a.begin(), a.end()), fb(b.begin(), b.end());
  int n = 1;
  while (n < a.size() + b.size()) n <<= 1;
  fa.resize(n);
  fb.resize(n);
  res.resize(n);
  fft(fa, 0);
  fft(fb, 0);
  for (int i = 0; i < n; i++) fa[i] = mul(fa[i], fb[i]);
  fft(fa, 1);
  for (int i = 0; i < n; i++) {
    if (fa[i])
      res[i] = 1;
    else
      res[i] = 0;
  }
}
vector<int> go(vector<int> a, int n) {
  vector<int> ans(2);
  ans[0] = 1;
  while (n) {
    if (n & 1) multiply(a, ans, ans);
    multiply(a, a, a);
    n >>= 1;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int n, k;
  cin >> n >> k;
  vector<int> a(1001);
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    a[x] = 1;
  }
  a = go(a, k);
  for (int i = 0; i < a.size(); i++)
    if (a[i]) cout << i << " ";
}
