#include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265359;
inline void fft(vector<complex<double> > &a, bool inv) {
  int n = a.size(), k = 0;
  while ((1 << k) < n) k++;
  for (int i = 0; i < n; i++) {
    int x = 0;
    for (int j = 0; j < k; j++)
      if (i & (1 << j)) x |= (1 << (k - 1 - j));
    if (i < x) swap(a[i], a[x]);
  }
  for (int i = 0; (1 << i) < n; i++) {
    for (int j = 0; j < n; j += (1 << (i + 1))) {
      double arg = (PI) / (1 << i);
      complex<double> w = 1;
      complex<double> t = complex<double>(cos(arg), sin(arg));
      for (int k = 0; k < (1 << i); k++) {
        complex<double> cur = w;
        if (inv) cur = conj(cur);
        complex<double> l = a[j + k];
        complex<double> r = a[j + k + (1 << i)] * cur;
        a[j + k] = l + r;
        a[j + k + (1 << i)] = l - r;
        w *= t;
      }
    }
  }
  if (inv) {
    for (int i = 0; i < n; i++) a[i] /= n;
  }
}
inline vector<int> multiply(const vector<int> &first,
                            const vector<int> &second) {
  vector<complex<double> > a(first.begin(), first.end());
  vector<complex<double> > b(second.begin(), second.end());
  while (!a.empty() && a.back() == complex<double>(0)) a.pop_back();
  while (!b.empty() && b.back() == complex<double>(0)) b.pop_back();
  int logn = 0;
  while ((1 << logn) < a.size() + b.size()) logn++;
  while (a.size() < (1 << logn)) a.resize((1 << logn));
  while (b.size() < (1 << logn)) b.resize((1 << logn));
  fft(a, false);
  fft(b, false);
  for (int i = 0; i < a.size(); i++) {
    a[i] *= b[i];
  }
  fft(a, true);
  vector<int> res((1 << logn));
  for (int i = 0; i < a.size(); i++) {
    res[i] = min(1, (int)(a[i].real() + 0.5));
  }
  while (!res.empty() && res.back() == 0) res.pop_back();
  return res;
}
vector<int> binpow(vector<int> a, int st) {
  vector<int> res(1, 1);
  ;
  while (st) {
    if (st & 1) res = multiply(res, a);
    a = multiply(a, a);
    st >>= 1;
  }
  return res;
}
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  vector<int> a(1001);
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    a[x] = 1;
  }
  vector<int> ans = binpow(a, k);
  for (int i = 0; i < ans.size(); i++) {
    if (ans[i] > 0) printf("%d ", i);
  }
  return 0;
}
