#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return a * (b / gcd(a, b)); }
long long power(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = ((res % p) * (x % p)) % p;
    y = y >> 1;
    x = ((x % p) * (x % p)) % p;
  }
  return res;
}
long long raichu(long long x, long long y) {
  long long res = 1;
  while (y > 0) {
    if (y & 1) res = ((res) * (x));
    y = y >> 1;
    x = ((x) * (x));
  }
  return res;
}
bool isprime(long long n) {
  if (n < 2)
    return false;
  else if (n == 2)
    return true;
  else if (n % 2 == 0)
    return false;
  else {
    long long z = sqrt(n);
    for (long long i = 0; i < z - 1; i++)
      if (n % (i + 2) == 0) return false;
    return true;
  }
}
const long long prime = 13313;
namespace FFT {
const long long N = 20;
const long long MAXN = (1 << N);
const double PI = acos(-1.0);
class cmplx {
 private:
  double x, y;

 public:
  cmplx() : x(0.0), y(0.0) {}
  cmplx(double a) : x(a), y(0.0) {}
  cmplx(double a, double b) : x(a), y(b) {}
  double get_real() { return this->x; }
  double get_img() { return this->y; }
  cmplx conj() { return cmplx(this->x, -(this->y)); }
  cmplx operator=(const cmplx& a) {
    this->x = a.x;
    this->y = a.y;
    return *this;
  }
  cmplx operator+(const cmplx& b) {
    return cmplx(this->x + b.x, this->y + b.y);
  }
  cmplx operator-(const cmplx& b) {
    return cmplx(this->x - b.x, this->y - b.y);
  }
  cmplx operator*(const double& num) {
    return cmplx(this->x * num, this->y * num);
  }
  cmplx operator/(const double& num) {
    return cmplx(this->x / num, this->y / num);
  }
  cmplx operator*(const cmplx& b) {
    return cmplx(this->x * b.x - this->y * b.y, this->y * b.x + this->x * b.y);
  }
  cmplx operator/(const cmplx& b) {
    cmplx temp(b.x, -b.y);
    cmplx n = (*this) * temp;
    return n / (b.x * b.x + b.y * b.y);
  }
};
cmplx w[MAXN];
cmplx f1[MAXN];
long long rev[MAXN];
void ReserveBits(long long k) {
  static long long rk = -1, lim;
  if (k == rk) return;
  rk = k, lim = 1 << k;
  for (long long i = 1; i <= lim; ++i) {
    long long j = rev[i - 1], t = k - 1;
    while (t >= 0 && ((j >> t) & 1)) {
      j ^= 1 << t;
      --t;
    }
    if (t >= 0) {
      j ^= 1 << t;
      --t;
    }
    rev[i] = j;
  }
}
void fft(cmplx* a, long long k) {
  ReserveBits(k);
  long long n = 1 << k;
  for (long long i = 0; i < n; ++i)
    if (rev[i] > i) swap(a[i], a[rev[i]]);
  for (long long l = 2, m = 1; l <= n; l += l, m += m) {
    if (w[m].get_real() == 0 && w[m].get_img() == 0) {
      double angle = PI / m;
      cmplx ww(cos(angle), sin(angle));
      if (m > 1) {
        for (long long j = 0; j < m; ++j) {
          if (j & 1)
            w[m + j] = w[(m + j) / 2] * ww;
          else
            w[m + j] = w[(m + j) / 2];
        }
      } else
        w[m] = cmplx(1, 0);
    }
    for (long long i = 0; i < n; i += l) {
      for (long long j = 0; j < m; ++j) {
        cmplx v = a[i + j], u = a[i + j + m] * w[m + j];
        a[i + j] = v + u;
        a[i + j + m] = v - u;
      }
    }
  }
}
vector<long long> multiply(const vector<long long>& a,
                           const vector<long long>& b) {
  long long k = 1;
  while ((1 << k) < (a.size() + b.size())) ++k;
  long long n = (1 << k);
  for (long long i = 0; i < n; ++i) f1[i] = cmplx(0, 0);
  for (long long i = 0; i < a.size(); ++i) f1[i] = f1[i] + cmplx(a[i], 0);
  for (long long i = 0; i < b.size(); ++i) f1[i] = f1[i] + cmplx(0, b[i]);
  fft(f1, k);
  for (long long i = 0; i <= n / 2; ++i) {
    cmplx p = f1[i] + f1[(n - i) % n].conj();
    cmplx _q = f1[(n - i) % n] - f1[i].conj();
    cmplx q(_q.get_img(), _q.get_real());
    f1[i] = (p * q) * 0.25;
    if (i > 0) f1[(n - i)] = f1[i].conj();
  }
  for (long long i = 0; i < n; ++i) f1[i] = f1[i].conj();
  fft(f1, k);
  vector<long long> ans(a.size() + b.size() - 1);
  for (long long i = 0; i < ans.size(); ++i) {
    ans[i] = (long long)(f1[i].get_real() / n + 0.5);
  }
  return ans;
}
};  // namespace FFT
using namespace FFT;
vector<long long> pfft(vector<long long>& a, long long k) {
  vector<long long> res;
  res.push_back(1);
  while (k > 0) {
    if (k & 1) res = multiply(res, a);
    k = k >> 1;
    a = multiply(a, a);
    for (long long i = 0; i < (long long)a.size(); i++)
      if (a[i] > 0) a[i] = 1;
    for (long long i = 0; i < (long long)res.size(); i++)
      if (res[i] > 0) res[i] = 1;
  }
  return res;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, k;
  cin >> n >> k;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  vector<long long> z(1001, 0);
  for (long long i = 0; i < n; i++) z[a[i]] = 1;
  vector<long long> ans = pfft(z, k);
  for (long long i = 0; i < (long long)ans.size(); i++)
    if (ans[i] > 0) cout << i << " ";
  return 0;
}
