Problem: Define the simple skewness of a collection of numbers to be the collection's mean minus its median. You are given a list of n (not necessarily distinct) integers. Find the non-empty subset (with repetition) with the maximum simple skewness.

The mean of a collection is the average of its elements. The median of a collection is its middle element when all of its elements are sorted, or the average of its two middle elements if it has even size.

Input

The first line of the input contains a single integer n (1 ≤ n ≤ 200 000) — the number of elements in the list.

The second line contains n integers xi (0 ≤ xi ≤ 1 000 000) — the ith element of the list.

Output

In the first line, print a single integer k — the size of the subset.

In the second line, print k integers — the elements of the subset in any order.

If there are multiple optimal subsets, print any.

Examples

Input

4
1 2 3 12


Output

3
1 2 12 


Input

4
1 1 2 2


Output

3
1 1 2 


Input

2
1 2


Output

2
1 2

Note

In the first case, the optimal subset is <image>, which has mean 5, median 2, and simple skewness of 5 - 2 = 3.

In the second case, the optimal subset is <image>. Note that repetition is allowed.

In the last case, any subset has the same median and mean, so all have simple skewness of 0.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int MAXN = 222222;
const int INF = 0x3f3f3f3f;
const ll LINF = 0x3f3f3f3f3f3f3f3fLL;
template <typename T>
T gcd(T a, T b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
class Rational {
 public:
  using TBase = long long;
  static const Rational ZERO;
  static const Rational ONE;
  static const Rational TWO;
  static const double EPS;
  TBase a, b;
  Rational() : a(0), b(1) {}
  Rational(TBase _a) : a(_a), b(1) {}
  Rational(TBase _a, TBase _b) : a(_a), b(_b) { norm(); }
  operator bool() const { return (a != 0); }
  operator long long() const { return a / b; }
  operator long double() const { return (a + 0.) / b; }
  bool operator!() const { return !a; }
  bool operator&&(const bool x) const { return (a > 0 && x); }
  Rational operator-() const { return Rational(-a, b); }
  Rational operator+() const { return Rational(a, b); }
  Rational& operator++() {
    a += b;
    return *this;
  }
  Rational operator++(int) {
    a += b;
    return Rational(a - b, b);
  }
  Rational& operator--() {
    a -= b;
    return *this;
  }
  Rational operator--(int) {
    a -= b;
    return Rational(a + b, b);
  }
  Rational operator+(const Rational& x) const {
    return Rational(a * x.b + x.a * b, b * x.b);
  }
  Rational operator-(const Rational& x) const {
    return Rational(a * x.b - x.a * b, b * x.b);
  }
  Rational operator*(const Rational& x) const {
    return Rational(a * x.a, b * x.b);
  }
  Rational operator/(const Rational& x) const {
    return Rational(a * x.b, b * x.a);
  }
  Rational& operator+=(const Rational& x) {
    a = a * x.b + x.a * b;
    b *= x.b;
    norm();
    return *this;
  }
  Rational& operator-=(const Rational& x) {
    a = a * x.b - x.a * b;
    b *= x.b;
    norm();
    return *this;
  }
  Rational& operator*=(const Rational& x) {
    a *= x.a;
    b *= x.b;
    norm();
    return *this;
  }
  Rational& operator/=(const Rational& x) {
    a *= x.b;
    b *= x.a;
    norm();
    return *this;
  }
  Rational operator+(const int x) const {
    return Rational(a + static_cast<TBase>(x) * b, b);
  }
  Rational operator-(const int x) const {
    return Rational(a - static_cast<TBase>(x) * b, b);
  }
  Rational operator*(const int x) const {
    return Rational(a * static_cast<TBase>(x), b);
  }
  Rational operator/(const int x) const {
    return Rational(a, b * static_cast<TBase>(x));
  }
  Rational& operator+=(const int x) {
    a += b * static_cast<TBase>(x);
    return *this;
  }
  Rational& operator-=(const int x) {
    a -= b * static_cast<TBase>(x);
    return *this;
  }
  Rational& operator*=(const int x) {
    a *= static_cast<TBase>(x);
    norm();
    return *this;
  }
  Rational& operator/=(const int x) {
    b *= static_cast<TBase>(x);
    norm();
    return *this;
  }
  Rational operator+(const ll x) const {
    return Rational(a + static_cast<TBase>(x) * b, b);
  }
  Rational operator-(const ll x) const {
    return Rational(a - static_cast<TBase>(x) * b, b);
  }
  Rational operator*(const ll x) const {
    return Rational(a * static_cast<TBase>(x), b);
  }
  Rational operator/(const ll x) const {
    return Rational(a, b * static_cast<TBase>(x));
  }
  Rational& operator+=(const ll x) {
    a += b * static_cast<TBase>(x);
    return *this;
  }
  Rational& operator-=(const ll x) {
    a -= b * static_cast<TBase>(x);
    return *this;
  }
  Rational& operator*=(const ll x) {
    a *= static_cast<TBase>(x);
    norm();
    return *this;
  }
  Rational& operator/=(const ll x) {
    b *= static_cast<TBase>(x);
    norm();
    return *this;
  }
  double operator+(const double x) const { return (a + 0.) / b + x; }
  double operator-(const double x) const { return (a + 0.) / b - x; }
  double operator*(const double x) const { return (a + 0.) / b * x; }
  double operator/(const double x) const { return (a + 0.) / b / x; }
  bool operator==(const Rational& x) const { return (a == x.a && b == x.b); }
  bool operator!=(const Rational& x) const { return (a != x.a || b != x.b); }
  bool operator<(const Rational& x) const { return (a * x.b < x.a * b); }
  bool operator>(const Rational& x) const { return (a * x.b > x.a * b); }
  bool operator<=(const Rational& x) const { return (a * x.b <= x.a * b); }
  bool operator>=(const Rational& x) const { return (a * x.b >= x.a * b); }
  bool operator==(const int x) const {
    return (a == static_cast<TBase>(x) * b);
  }
  bool operator!=(const int x) const {
    return (a != static_cast<TBase>(x) * b);
  }
  bool operator<(const int x) const { return (a < static_cast<TBase>(x) * b); }
  bool operator>(const int x) const { return (a > static_cast<TBase>(x) * b); }
  bool operator<=(const int x) const {
    return (a <= static_cast<TBase>(x) * b);
  }
  bool operator>=(const int x) const {
    return (a >= static_cast<TBase>(x) * b);
  }
  bool operator==(const ll x) const { return (a == static_cast<TBase>(x) * b); }
  bool operator!=(const ll x) const { return (a != static_cast<TBase>(x) * b); }
  bool operator<(const ll x) const { return (a < static_cast<TBase>(x) * b); }
  bool operator>(const ll x) const { return (a > static_cast<TBase>(x) * b); }
  bool operator<=(const ll x) const { return (a <= static_cast<TBase>(x) * b); }
  bool operator>=(const ll x) const { return (a >= static_cast<TBase>(x) * b); }
  bool operator==(const double x) const {
    return (fabs((a + 0.) / b - x) < EPS);
  }
  bool operator!=(const double x) const {
    return (fabs((a + 0.) / b - x) > EPS);
  }
  bool operator<(const double x) const { return ((a + 0.) / b + EPS < x); }
  bool operator>(const double x) const { return ((a + 0.) / b > x + EPS); }
  bool operator<=(const double x) const { return ((a + 0.) / b + EPS <= x); }
  bool operator>=(const double x) const { return ((a + 0.) / b >= x + EPS); }
  void norm() {
    TBase g = gcd(a, b);
    a /= g;
    b /= g;
    if (b < 0) {
      a = -a;
      b = -b;
    }
  }
  Rational negate() const { return Rational(-a, b); }
  Rational abs() const { return (a < 0 ? Rational(-a, b) : Rational(a, b)); }
  Rational inverse() const { return Rational(b, a); }
  int sign() const { return (a < 0 ? -1 : (a > 0)); }
  double doubleValue() const { return (a + 0.) / b; }
  TBase Floor() const { return a / b; }
  TBase Ceil() const { return static_cast<TBase>(ceil((a + 0.) / b - EPS)); }
  TBase Round() const {
    double cur = (a + 0.) / b;
    return static_cast<TBase>(
        (cur < 0 ? ceil(cur - .5 - EPS) : floor(cur + .5 + EPS)));
  }
  double frac() const { return (a + 0.) / b - a / b; }
  ll hashCode() const { return a * 877117 + b; }
  friend ostream& operator<<(ostream& out, Rational& x) {
    return out << x.a << "/" << x.b;
  }
};
const Rational Rational::ZERO = Rational(0);
const Rational Rational::ONE = Rational(1);
const Rational Rational::TWO = Rational(2);
const double Rational::EPS = EPS;
int n;
ll pref[MAXN];
vector<ll> a;
Rational check(int offset, int idx) {
  return std::move(
      Rational(pref[idx] - pref[idx - offset - 1] + pref[n] - pref[n - offset],
               offset * 2 + 1) -
      Rational(a[idx]));
}
template <typename T>
bool umax(T& value, const T& rhs) {
  if (value < rhs) {
    value = std::move(rhs);
    return true;
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  while (cin >> n) {
    a.resize(n + 1);
    a[0] = 0;
    for (int i = 1; i <= n; ++i) {
      cin >> a[i];
    }
    sort(a.begin(), a.end());
    pref[0] = 0;
    for (int i = 1; i <= n; ++i) {
      pref[i] = pref[i - 1] + a[i];
    }
    Rational total_best = -INF;
    int ax = 0, ay = 0;
    for (int i = 1; i <= n; ++i) {
      int L = 0, R = min(i - 1, n - i);
      while (R - L > 2) {
        int diff = (R - L) / 3;
        int m1 = L + diff, m2 = R - diff;
        if (check(m1, i) < check(m2, i)) {
          L = m1;
        } else {
          R = m2;
        }
      }
      Rational val = std::move(check(L, i));
      int best = L;
      for (int j = L + 1; j <= R; ++j) {
        if (umax(val, std::move(check(j, i)))) {
          best = j;
        }
      }
      if (umax(total_best, val)) {
        ay = best;
        ax = i;
      }
    }
    cout << (ay * 2 + 1) << endl;
    for (int i = ax - ay; i <= ax; ++i) {
      cout << a[i] << " ";
    }
    for (int i = n - ay + 1; i <= n; ++i) {
      cout << a[i] << " ";
    }
    cout << endl;
  }
  return 0;
}