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;
vector<long long> pref;
long long sum(int l, int r) {
  if (!l) {
    return pref[r];
  }
  return pref[r] - pref[l - 1];
}
struct answer {
  int med;
  int len;
  bool odd;
  long long ch, zn;
};
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<long long> a(n);
  pref.resize(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  sort((a).begin(), (a).end());
  pref[0] = a[0];
  for (int i = 1; i < n; ++i) {
    pref[i] = pref[i - 1] + a[i];
  }
  answer ans;
  ans.ch = 0, ans.zn = 1;
  for (int i = 1; i < n - 1; ++i) {
    int l = 1, r = min(i, n - i - 1) + 1;
    while (l != r - 1) {
      int mid = (l + r) >> 1;
      long long a1 = sum(i - mid, i) + sum(n - mid, n - 1);
      long long a2 = sum(i - (mid - 1), i) + sum(n - (mid - 1), n - 1);
      if (a1 * (2 * (long long)(mid)-1) > a2 * (2 * (long long)(mid) + 1)) {
        l = mid;
      } else {
        r = mid;
      }
    }
    long long ch = sum(i - l, i) + sum(n - l, n - 1);
    ch -= a[i] * (2 * (long long)(l) + 1);
    long long zn = 2 * (long long)(l) + 1;
    if (ans.ch * zn < ch * ans.zn) {
      ans.ch = ch;
      ans.zn = zn;
      ans.len = l;
      ans.med = i;
      ans.odd = true;
    }
  }
  for (int i = 1; i < n - 2; ++i) {
    int l = 1, r = min(i, n - i - 2) + 1;
    while (l != r - 1) {
      int mid = (l + r) >> 1;
      long long a1 = sum(i - mid, i + 1) + sum(n - mid, n - 1);
      long long a2 = sum(i - (mid - 1), i + 1) + sum(n - (mid - 1), n - 1);
      if (a1 * (2 * (long long)(mid)) > a2 * (2 * (long long)(mid) + 2)) {
        l = mid;
      } else {
        r = mid;
      }
    }
    long long ch = sum(i - l, i + 1) + sum(n - l, n - 1);
    ch -= (a[i] + a[i + 1]) * ((long long)(l) + 1);
    long long zn = 2 * (long long)(l) + 2;
    if (ans.ch * zn < ch * ans.zn) {
      ans.ch = ch;
      ans.zn = zn;
      ans.len = l;
      ans.med = i;
      ans.odd = false;
    }
  }
  if (ans.ch == 0) {
    cout << "1\n";
    cout << a[0] << "\n";
    return 0;
  }
  if (ans.odd) {
    cout << ans.len * 2 + 1 << "\n";
    for (int i = ans.med - ans.len; i <= ans.med; ++i) {
      cout << a[i] << " ";
    }
    for (int i = n - ans.len; i < n; ++i) {
      cout << a[i] << " ";
    }
    cout << "\n";
    return 0;
  }
  cout << ans.len * 2 + 2 << "\n";
  for (int i = ans.med - ans.len; i <= ans.med + 1; ++i) {
    cout << a[i] << " ";
  }
  for (int i = n - ans.len; i < n; ++i) {
    cout << a[i] << " ";
  }
  cout << "\n";
}