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;
const double EPS = 1e-4;
const long double PI = acos((long double)-1.0);
const long long int MOD = 1e9 + 7;
long long int powmod(long long int a, long long int b, long long int mod) {
  long long int res = 1;
  a %= mod;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
const int debug = 1;
template <typename T>
void DBG(vector<T> v) {
  if (debug) {
    for (T t : v) cout << t << "  ";
    cout << endl;
  }
}
template <typename T>
void DBG(T t) {
  if (debug) cout << t << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.precision(10);
  cout << fixed;
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < (n); ++i) cin >> v[i];
  sort(v.begin(), v.end());
  vector<long long int> psum(n);
  long long int sum = 0;
  for (int i = 0; i < (n); ++i) {
    sum += v[i];
    psum[i] = sum;
  }
  double best = 0;
  int best_idx = 0;
  int best_j = 0;
  for (int mean_idx = 0; mean_idx < n; mean_idx++) {
    int m = min(mean_idx, n - mean_idx - 1);
    int left = 0;
    int right = m;
    double vd = v[mean_idx];
    while (left != right) {
      int middle = (left + right) / 2;
      long long int value = psum[n - 1] - psum[n - middle - 1];
      value += psum[mean_idx] -
               (mean_idx - middle - 1 >= 0 ? psum[mean_idx - middle - 1] : 0);
      vd = (double)value / double(2 * middle + 1);
      if (middle < right) {
        long long int value_r = psum[n - 1] - psum[n - middle - 1 - 1];
        value_r += psum[mean_idx] - (mean_idx - middle - 1 - 1 >= 0
                                         ? psum[mean_idx - middle - 1 - 1]
                                         : 0);
        double vdr = (double)value_r / (double)(2 * middle + 3);
        if (vd < vdr) {
          left = middle + 1;
        } else {
          right = middle;
        }
      } else {
        long long int value_l = psum[n - 1] - psum[n - middle + 1 - 1];
        value_l += psum[mean_idx] - (mean_idx - middle + 1 - 1 >= 0
                                         ? psum[mean_idx - middle + 1 - 1]
                                         : 0);
        double vdl = (double)value_l / (double)(2 * middle - 1);
        if (vdl < vd) {
          left = middle + 1;
        } else {
          right = middle;
        }
      }
    }
    long long int val = psum[n - 1] - psum[n - left - 1];
    val += psum[mean_idx] -
           (mean_idx - left - 1 >= 0 ? psum[mean_idx - left - 1] : 0);
    vd = (double)val / double(2 * left + 1);
    double diff = vd - v[mean_idx];
    if (diff > best) {
      best = diff;
      best_idx = mean_idx;
      best_j = left;
    }
  }
  vector<int> output;
  for (int i = best_idx - best_j; i <= best_idx; i++) {
    output.push_back(v[i]);
  }
  for (int i = n - best_j; i < n; i++) {
    output.push_back(v[i]);
  }
  cout << 2 * best_j + 1 << endl;
  DBG(output);
}