#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 50;
const double PI = acos(-1.0);
void fft(vector<complex<double> > &a, bool invert) {
  int n = (int)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 (int i = 0; i < n; ++i) a[i] /= n;
}
void multiply(const vector<bool> &a, const vector<bool> &b, vector<bool> &res) {
  vector<complex<double> > fa(a.begin(), a.end()), fb(b.begin(), b.end());
  size_t n = 1;
  while (n < max(a.size(), b.size())) n <<= 1;
  n <<= 1;
  n = min(int(n), 1 << 20);
  fa.resize(n), fb.resize(n);
  fft(fa, false), fft(fb, false);
  for (size_t i = 0; i < n; ++i) fa[i] *= fb[i];
  fft(fa, true);
  res.resize(n);
  for (size_t i = 0; i < n; ++i) res[i] = int(fa[i].real() + 0.5);
}
vector<bool> power(vector<bool> &a, int p) {
  if (p == 1) return a;
  vector<bool> b = power(a, p / 2);
  multiply(b, b, b);
  if (p & 1) multiply(b, a, b);
  return b;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, k;
  cin >> n >> k;
  vector<bool> a(1005);
  for (int i = 0, x; i < n; i++) cin >> x, a[x] = 1;
  vector<bool> b = power(a, k);
  for (int i = 0; i < b.size(); i++)
    if (b[i]) cout << i << " ";
}
