#include <bits/stdc++.h>
using namespace std;
inline int in() {
  int x;
  scanf("%d", &x);
  return x;
}
inline void priv(vector<int> a) {
  for (int i = 0; i < ((int)(a).size()); ++i)
    printf("%d%c", a[i], i == (int)(a).size() - 1 ? '\n' : ' ');
}
template <typename T>
istream& operator>>(istream& i, vector<T>& v) {
  for (int j = 0; j < ((int)(v).size()); ++j) i >> v[j];
  return i;
}
template <typename T>
string join(const vector<T>& v) {
  stringstream s;
  for (int i = 0; i < ((int)(v).size()); ++i) s << ' ' << v[i];
  return s.str().substr(1);
}
template <typename T>
ostream& operator<<(ostream& o, const vector<T>& v) {
  if ((int)(v).size()) o << join(v);
  return o;
}
template <typename T1, typename T2>
istream& operator>>(istream& i, pair<T1, T2>& v) {
  return i >> v.first >> v.second;
}
template <typename T1, typename T2>
ostream& operator<<(ostream& o, const pair<T1, T2>& v) {
  return o << v.first << "," << v.second;
}
const int MX = 1001, INF = 1001001001;
const long long int LINF = 1e18;
const double eps = 1e-10;
struct C {
  double re, im;
  C(double re = 0, double im = 0) : re(re), im(im) {}
  C& operator+=(const C& a) {
    re += a.re;
    im += a.im;
    return *this;
  }
  C& operator-=(const C& a) {
    re -= a.re;
    im -= a.im;
    return *this;
  }
  C& operator*=(const C& a) {
    double tmp = re;
    re = re * a.re - im * a.im;
    im = tmp * a.im + im * a.re;
    return *this;
  }
  C operator+(const C& a) const { return C(*this) += a; }
  C operator-(const C& a) const { return C(*this) -= a; }
  C operator*(const C& a) const { return C(*this) *= a; }
  C operator~() const { return C(re, -im); }
};
const double PI = acos(-1.0);
struct fft {
  int n, l;
  vector<C> d;
  fft() {}
  fft(int mx) { init(mx); }
  fft(vector<int>& a, int mx = 0) {
    if (!mx) mx = (int)(a).size() * 2 - 1;
    init(mx);
    for (int i = 0; i < ((int)(a).size()); ++i) d[i].re = a[i];
    f();
  }
  fft(vector<int>& a, vector<int>& b, int mx = 0) {
    if (!mx) mx = (int)(a).size() + (int)(b).size() - 1;
    init(mx);
    for (int i = 0; i < ((int)(a).size()); ++i) d[i].re = a[i];
    for (int i = 0; i < ((int)(b).size()); ++i) d[i].im = b[i];
    f();
  }
  void init(int mx) {
    for (n = 1, l = 0; n < mx; n <<= 1, ++l)
      ;
    d.resize(n);
  }
  C& operator[](int i) { return d[i]; }
  void operator*=(fft& a) {
    for (int i = 0; i < (n); ++i) d[i] *= a[i];
  }
  void f(int s = 1) {
    for (int i = 0; i < (n); ++i) {
      int j = 0;
      for (int k = 0; k < (l); ++k)
        if (i & (1 << k)) j |= (1 << (l - 1 - k));
      if (i < j) swap(d[i], d[j]);
    }
    for (int t = 1; t < n; t <<= 1) {
      C w(cos(PI / t), sin(PI / t) * s), x(1, 0);
      vector<C> W(t);
      for (int i = 0; i < (t); ++i) W[i] = x, x *= w;
      for (int i = 0; i < n; i += t << 1) {
        for (int j = 0; j < (t); ++j) {
          C a = d[i + t + j] * W[j];
          d[i + t + j] = d[i + j] - a;
          d[i + j] += a;
        }
      }
    }
  }
  fft split() {
    fft a(n);
    a[0].re = d[0].re;
    for (int i = 1; i < n; ++i)
      a[i] = C((d[i].re + d[n - i].re) / 2, (d[i].im - d[n - i].im) / 2);
    for (int i = 0; i < (n); ++i) d[i] = (d[i] - a[i]) * C(0, -1);
    swap(d, a.d);
    return a;
  }
  void merge(fft& a) {
    for (int i = 0; i < (n); ++i) d[i] += C(-a[i].im, a[i].re);
  }
  vector<int> get(int w = 0) {
    f(-1);
    if (!w) w = n;
    vector<int> res(w);
    for (int i = 0; i < (w); ++i) res[i] = int(d[i].re / n + 0.5);
    return res;
  }
  vector<int> getmod(int w) {
    f(-1);
    vector<int> res(w);
    for (int i = 0; i < (w); ++i)
      res[i] = int((d[i].re + d[i + w].re) / n + 0.5);
    return res;
  }
  void get(vector<int>& a, vector<int>& b) {
    f(-1);
    int w = (int)(a).size();
    if (w * 2 <= n) {
      for (int i = 0; i < (w); ++i)
        a[i] = int((d[i].re + d[i + w].re) / n + 0.5);
      for (int i = 0; i < (w); ++i)
        b[i] = int((d[i].im + d[i + w].im) / n + 0.5);
    } else {
      for (int i = 0; i < (n); ++i) a[i] = int(d[i].re / n + 0.5);
      for (int i = 0; i < (n); ++i) b[i] = int(d[i].im / n + 0.5);
    }
  }
};
vector<int> norm(vector<int> a) {
  for (int i = 0; i < ((int)(a).size()); ++i) a[i] = !!a[i];
  return a;
}
vector<int> convolute(vector<int> a, vector<int> b) {
  fft s(a, b);
  fft t = s.split();
  s *= t;
  return s.get((int)(a).size() + (int)(b).size() - 1);
}
vector<int> e;
vector<int> ex(int t) {
  if (t == 1) return e;
  vector<int> res = ex(t >> 1);
  res = norm(convolute(res, res));
  if (t & 1) res = norm(convolute(res, e));
  return res;
}
int main() {
  int n, t;
  scanf("%d%d", &n, &t);
  e = vector<int>(MX);
  for (int i = 0; i < (n); ++i) {
    int x;
    scanf("%d", &x);
    e[x] = 1;
  }
  vector<int> res = ex(t);
  vector<int> ans;
  for (int i = 0; i < ((int)(res).size()); ++i)
    if (res[i]) ans.push_back(i);
  cout << ans << endl;
  return 0;
}
