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;
int n;
int a[200001];
long long sum[200001] = {};
long long num = -1, denom = 1;
int bestMid, bestCnt;
bool doubleMid;
vector<int> ans;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < (int)(n); ++i) scanf("%d", a + i);
  sort(a, a + n);
  sum[0] = 0;
  for (int i = 0; i < (int)(n); ++i) sum[i + 1] = sum[i] + a[i];
  for (int i = 0; i < (int)(n); ++i) {
    int lo = 0, hi = min(i, n - 1 - i), mid;
    while (lo < hi) {
      mid = (lo + hi + 1) >> 1;
      if (2ll * (sum[i + 1] - sum[i - mid + 1] + sum[n] - sum[n - mid + 1]) <
          (long long)(2 * mid - 1) * (a[i - mid] + a[n - mid]))
        lo = mid;
      else
        hi = mid - 1;
    }
    if ((sum[i + 1] - sum[i - lo] + sum[n] - sum[n - lo] -
         (long long)(2 * lo + 1) * a[i]) *
            denom >
        num * (2 * lo + 1)) {
      num = sum[i + 1] - sum[i - lo] + sum[n] - sum[n - lo] -
            (long long)(2 * lo + 1) * a[i];
      denom = 2 * lo + 1;
      bestMid = i;
      bestCnt = lo;
      doubleMid = false;
    }
  }
  for (int i = 0; i < (int)(n - 1); ++i) {
    int lo = 0, hi = min(i, n - 2 - i), mid;
    while (lo < hi) {
      mid = (lo + hi + 1) >> 1;
      if (2ll * (sum[i + 2] - sum[i - mid + 1] + sum[n] - sum[n - mid + 1]) <
          (long long)(2 * mid) * (a[i - mid] + a[n - mid]))
        lo = mid;
      else
        hi = mid - 1;
    }
    if ((sum[i + 2] - sum[i - lo] + sum[n] - sum[n - lo] -
         (long long)(lo + 1) * (a[i] + a[i + 1])) *
            denom >
        num * (2 * lo + 2)) {
      num = sum[i + 2] - sum[i - lo] + sum[n] - sum[n - lo] -
            (long long)(lo + 1) * (a[i] + a[i + 1]);
      denom = 2 * lo + 2;
      bestMid = i;
      bestCnt = lo;
      doubleMid = true;
    }
  }
  ans.push_back(a[bestMid]);
  if (doubleMid) ans.push_back(a[bestMid + 1]);
  for (int i = 0; i < (int)(bestCnt); ++i) {
    ans.push_back(a[bestMid - 1 - i]);
    ans.push_back(a[n - 1 - i]);
  }
  sort(ans.begin(), ans.end());
  printf("%d\n", (int)ans.size());
  for (int x : ans) printf("%d ", x);
  printf("\n");
  return 0;
}