#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1);
void fft(vector<complex<double>>& 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) {
    double ang = 2 * PI / len * (invert ? -1 : 1);
    complex<double> wlen(cos(ang), sin(ang));
    for (int i = 0; i < n; i += len) {
      complex<double> w(1);
      for (int j = 0; j < len / 2; j++) {
        complex<double> u = a[i + j], v = a[i + j + len / 2] * w;
        a[i + j] = u + v;
        a[i + j + len / 2] = u - v;
        w *= wlen;
      }
    }
  }
  if (invert) {
    for (complex<double>& x : a) x /= n;
  }
}
vector<int> multiply(vector<int> const& a, vector<int> const& b) {
  vector<complex<double>> 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);
  fft(fa, false);
  fft(fb, false);
  for (int i = 0; i < n; i++) fa[i] *= fb[i];
  fft(fa, true);
  vector<int> result(n);
  for (int i = 0; i < n; i++) result[i] = (round(fa[i].real()) > 0.9 ? 1 : 0);
  return result;
}
vector<int> powPolynomial(vector<int> polynomial, int exponent) {
  vector<int> res = {1};
  while (exponent > 0) {
    if (exponent % 2 == 1) {
      res = multiply(res, polynomial);
    }
    exponent /= 2;
    polynomial = multiply(polynomial, polynomial);
  }
  return res;
}
int main() {
  ios::sync_with_stdio(false);
  int n, k;
  cin >> n >> k;
  vector<int> a(1010, 0);
  for (int i = 0; i < n; i++) {
    int in;
    cin >> in;
    a[in] = 1;
  }
  vector<int> res = powPolynomial(a, k);
  for (int i = 0; i < res.size(); i++) {
    if (res[i]) {
      cout << i << " ";
    }
  }
  return 0;
}
