#include <bits/stdc++.h>
using namespace std;
const int MOD = 7340033;
const int ROOT = 5;
const int ROOT_INV = 4404020;
const int ROOT_PW = (1 << 20);
int pwr(int a, int b) {
  if (b == 0) return 1;
  if (b & 1) return 1LL * a * pwr(a, (b ^ 1)) % MOD;
  int aux = pwr(a, (b >> 1));
  return 1LL * aux * aux % MOD;
}
void FFT(vector<int> &a, bool invert) {
  int n = (int)a.size();
  for (int i = 1, j = 0; i < n; i++) {
    int bit = (n >> 1);
    while (j & bit) {
      j ^= bit;
      bit >>= 1;
    }
    j ^= bit;
    if (i < j) swap(a[i], a[j]);
  }
  for (int len = 2; len <= n; len <<= 1) {
    int wlen = (invert ? ROOT_INV : ROOT);
    for (int aux = len; aux < ROOT_PW; aux <<= 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 x = a[i + j];
        int y = 1LL * w * a[i + j + (len >> 1)] % MOD;
        a[i + j] = x + y;
        if (a[i + j] >= MOD) a[i + j] -= MOD;
        a[i + j + (len >> 1)] = x - y;
        if (a[i + j + (len >> 1)] < 0) a[i + j + (len >> 1)] += MOD;
        w = 1LL * w * wlen % MOD;
      }
    }
  }
  if (invert == true) {
    int N_INV = pwr(n, MOD - 2);
    for (int i = 0; i < n; i++) a[i] = 1LL * a[i] * N_INV % MOD;
  }
}
vector<int> mul(vector<int> a, vector<int> b) {
  int n = 1;
  while (n < (int)a.size() + (int)b.size()) n <<= 1;
  a.resize(n);
  b.resize(n);
  FFT(a, false);
  FFT(b, false);
  for (int i = 0; i < n; i++) a[i] = 1LL * a[i] * b[i] % MOD;
  FFT(a, true);
  for (int i = 0; i < n; i++) a[i] = (a[i] > 0);
  return a;
}
const int A_MAX = 1000;
int n, k;
vector<int> p;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  p.resize(A_MAX + 1);
  for (int i = 1; i <= n; i++) {
    int a;
    cin >> a;
    p[a] = 1;
  }
  vector<int> q{1};
  while (true) {
    if (k & 1) q = mul(q, p);
    k >>= 1;
    if (k > 0)
      p = mul(p, p);
    else
      break;
  }
  for (int i = 1; i < (int)q.size(); i++)
    if (q[i] != 0) cout << i << " ";
  cout << "\n";
  return 0;
}
