#include <bits/stdc++.h>
using namespace std;
struct Complex {
  double re, im;
  Complex(double _re = 0, double _im = 0) : re(_re), im(_im) {}
  Complex operator+(Complex &r) { return Complex(re + r.re, im + r.im); }
  Complex operator-(Complex &r) { return Complex(re - r.re, im - r.im); }
  Complex operator*(Complex &r) {
    return Complex(re * r.re - im * r.im, re * r.im + im * r.re);
  }
  Complex operator/=(double x) {
    re /= x, im /= x;
    return *this;
  }
};
int N, rev[2000010];
void init(int len) {
  for (N = 1; N <= len; N <<= 1)
    ;
  for (int i = 0; i < N; i++)
    rev[i] = (rev[i >> 1] >> 1) + (bool)(i & 1) * (N >> 1);
}
void FFT(vector<Complex> &v, int dir) {
  for (int i = 0; i < N; i++)
    if (i < rev[i]) swap(v[i], v[rev[i]]);
  for (int i = 1; i < N; i <<= 1) {
    Complex wn = Complex(cos(3.1415926536 / i), sin(3.1415926536 / i) * dir);
    for (int j = 0; j < N; j += 2 * i) {
      Complex w = Complex(1, 0);
      for (int k = 0; k < i; k++) {
        Complex x = v[j + k], y = v[j + k + i] * w;
        v[j + k] = x + y;
        v[j + k + i] = x - y;
        w = w * wn;
      }
    }
  }
  if (dir == -1) {
    for (int i = 0; i < N; i++) v[i] /= N;
  }
}
vector<Complex> operator*(vector<Complex> a, vector<Complex> b) {
  int n = a.size() - 1, m = b.size() - 1;
  init(n + m + 1);
  a.resize(N), b.resize(N);
  FFT(a, 1), FFT(b, 1);
  for (int i = 0; i < N; i++) a[i] = a[i] * b[i];
  FFT(a, -1);
  a.resize(n + m + 1);
  for (int i = 0; i < n + m + 1; i++)
    if ((int)(a[i].re + .5) > 0)
      a[i] = Complex(1, 0);
    else
      a[i] = Complex(0, 0);
  return a;
}
vector<Complex> unit;
vector<Complex> mul(vector<Complex> a, int b) {
  if (!b) return unit;
  vector<Complex> k = mul(a, b / 2);
  if (b & 1) return k * k * a;
  return k * k;
}
int n, k, x[1010];
vector<Complex> f;
int main() {
  ios::sync_with_stdio(false);
  unit.push_back(Complex(1, 0));
  cin >> n >> k;
  int MAX = 0;
  for (int i = 1; i <= n; i++) {
    cin >> x[i];
    MAX = max(MAX, x[i]);
  }
  f.resize(MAX + 1);
  for (int i = 1; i <= n; i++) f[x[i]] = 1;
  f = mul(f, k);
  for (int i = 0; i < f.size(); i++)
    if (f[i].re > 1e-8) cout << i << ' ';
  cout << endl;
  return 0;
}
