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 <typename _T, typename _T2>
string to_string(pair<_T, _T2> x) {
  return "<" + to_string(x.first) + ", " + to_string(x.second) + ">";
}
template <typename _T>
string to_string(vector<_T> vec) {
  string s = "[ ";
  for (auto el : vec) s += to_string(el) + ", ";
  s[s.size() - 1] = ']';
  s[s.size() - 2] = ' ';
  return s;
}
string to_string(string s) { return s; }
template <typename _T>
string to_string(set<_T> vec) {
  string s = "{ ";
  for (auto el : vec) s += to_string(el) + ", ";
  s[s.size() - 1] = '}';
  s[s.size() - 2] = ' ';
  return s;
}
template <typename _T, typename _T2>
string to_string(map<_T, _T2> vec) {
  string s = "{ ";
  for (auto el : vec)
    s += "mp[" + to_string(el.first) + "]= " + to_string(el.second) + ", ";
  s[s.size() - 1] = '}';
  s[s.size() - 2] = ' ';
  return s;
}
template <typename _T>
inline void _DBG(const char *s, _T x) {
  cerr << s << " = " << to_string(x) << "\n";
}
template <typename _T, typename... args>
void _DBG(const char *s, _T x, args... a) {
  while (*s != ',') cerr << *s++;
  cerr << " = " << to_string(x) << "\n";
  _DBG(s + 1, a...);
}
mt19937 rng___(chrono::steady_clock::now().time_since_epoch().count());
const long long MOD = 1e9 + 7;
const long long LLINF = 1e18 + 7;
const int N = 1e5 + 8;
int n;
vector<long long> vec, pref;
double skewness(int i, int r) {
  double median = vec[i];
  double avg =
      (double)(pref[i + 1] - pref[i - r] + pref[n] - pref[n - r]) / (2 * r + 1);
  return avg - median;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  ;
  cin >> n;
  vec.resize(n);
  pref.resize(n + 1);
  for (int i = 0; i < n; i++) {
    cin >> vec[i];
  }
  sort((vec).begin(), (vec).end());
  for (int i = 0; i < n; i++) {
    pref[i + 1] = pref[i] + vec[i];
  }
  pair<int, int> best = {0, 0};
  double ans = -1;
  for (int i = 0; i < n; i++) {
    double median = vec[i];
    int L = 0, R = min(i, n - i - 1);
    double curans = -1;
    pair<int, int> curbest = {-1, -1};
    while (L <= R) {
      int mid = (L + R) / 2;
      double a = skewness(i, mid);
      if (mid == R) {
        if (skewness(i, mid) > curans) {
          curans = skewness(i, mid);
          curbest = {i, mid};
        }
        break;
      }
      double b = skewness(i, mid + 1);
      if (a <= b) {
        L = mid + 2;
        if (b > curans) {
          curans = b;
          curbest = {i, mid + 1};
        }
      } else {
        R = mid - 1;
        if (a > curans) {
          curans = a;
          curbest = {i, mid};
        }
      }
    };
    ;
    if (curans > ans) {
      ans = curans;
      best = curbest;
    }
  };
  ;
  cout << best.second * 2 + 1 << '\n';
  for (int i = best.first - best.second; i <= best.first; i++)
    cout << vec[i] << " ";
  for (int i = n - 1; i > n - best.second - 1; i--) cout << vec[i] << " ";
}