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;
template <class C>
void mini(C &a4, C b4) {
  a4 = min(a4, b4);
}
template <class C>
void maxi(C &a4, C b4) {
  a4 = max(a4, b4);
}
template <class C>
ostream &operator<<(ostream &os, vector<C> v) {
  os << "[";
  for (auto t : v) {
    os << t << ",";
  }
  os << "]";
  return os;
}
template <class L, class R>
ostream &operator<<(ostream &os, pair<L, R> p) {
  return os << "(" << p.first << "," << p.second << ")";
}
void odbij(pair<long long, long long> &p) { p.second = -p.second; }
void odbij(vector<pair<long long, long long> > &v) {
  for (pair<long long, long long> &p : v) {
    odbij(p);
  }
}
pair<long long, long long> &operator-=(pair<long long, long long> &lhs,
                                       const pair<long long, long long> &rhs) {
  lhs.first -= rhs.first;
  lhs.second -= rhs.second;
  return lhs;
}
const pair<long long, long long> operator-(
    pair<long long, long long> lhs, const pair<long long, long long> &rhs) {
  lhs -= rhs;
  return lhs;
}
long long sum(vector<long long> &pref, long long a, long long b) {
  return pref[b + 1] - pref[a];
}
long double f(vector<long long> &pref, vector<long long> &inp, long long x,
              long long l) {
  long long n = ((long long)(inp).size());
  long double score1 =
      inp[x] + sum(pref, x - l, x - 1) + sum(pref, n - l, n - 1);
  score1 /= (long double)(2 * l + 1);
  return score1;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  long long n;
  cin >> n;
  vector<long long> inp(n);
  for (long long i = 0; i < (long long)(n); i++) {
    cin >> inp[i];
  }
  sort((inp).begin(), (inp).end());
  if (n <= 2) {
    cout << 1 << "\n";
    cout << inp[0] << "\n";
    return 0;
  }
  vector<long long> pref(n + 1);
  for (long long i = (long long)(1); i <= (long long)(n); i++) {
    pref[i] = pref[i - 1] + inp[i - 1];
  }
  pair<long double, pair<long long, long long> > res = {-1, {-1, -1}};
  for (long long i = (long long)(1); i <= (long long)(n - 2); i++) {
    long long l = 0;
    long long r = min(i, n - i - 1);
    while (l + 2 < r) {
      long long len1 = (2 * l + r) / 3;
      long long len2 = (l + 2 * r) / 3;
      if (f(pref, inp, i, len1) < f(pref, inp, i, len2)) {
        l = len1;
      } else {
        r = len2;
      }
    }
    for (long long j = (long long)(l); j <= (long long)(r); j++) {
      long double score = f(pref, inp, i, j) - inp[i];
      maxi(res, {score, {i, j}});
    }
  }
  vector<long long> vres;
  long long idx = res.second.first;
  vres.push_back(inp[idx]);
  for (long long i = 0; i < (long long)(res.second.second); i++) {
    vres.push_back(inp[idx - i - 1]);
    vres.push_back(inp[n - i - 1]);
  }
  cout << ((long long)(vres).size()) << "\n";
  for (long long a : vres) {
    cout << a << " ";
  }
  cout << "\n";
}