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;
long long arr[200005];
long long suff[200005];
inline bool compare(const pair<long long, long long> &a,
                    const pair<long long, long long> &b) {
  return a.first * 1LL * b.second - b.first * 1LL * a.second > 0;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%I64d", &arr[i]);
  sort(arr, arr + n);
  for (int i = 0; i < n; i++) {
    suff[i] = arr[i];
    if (i) suff[i] += suff[i - 1];
  }
  pair<long long, long long> res = make_pair(0, 1);
  pair<int, pair<int, int> > ans = make_pair(0, make_pair(0, 0));
  for (int i = 1; i + 1 < n; i++) {
    int L = 1, R = min(i, n - i - 1);
    while (R - L > 4) {
      int m1 = L + (R - L) / 3;
      int m2 = L + 2 * (R - L) / 3;
      pair<long long, long long> a =
          make_pair(suff[i] + suff[n - 1] - suff[n - m1 - 1], 2 * m1 + 1);
      if (i >= m1 - 1) a.first -= suff[i - m1 - 1];
      pair<long long, long long> b =
          make_pair(suff[i] + suff[n - 1] - suff[n - m2 - 1], 2 * m2 + 1);
      if (i >= m2 - 1) b.first -= suff[i - m2 - 1];
      if (compare(a, b))
        R = m2;
      else
        L = m1;
    }
    pair<long long, long long> tmp =
        make_pair(suff[i] + suff[n - 1] - suff[n - L - 1], 2 * L + 1);
    int len = L;
    if (i >= L - 1) tmp.first -= suff[i - L - 1];
    for (int j = L + 1; j <= R; j++) {
      pair<long long, long long> a =
          make_pair(suff[i] + suff[n - 1] - suff[n - j - 1], 2 * j + 1);
      if (i >= j - 1) a.first -= suff[i - j - 1];
      if (compare(a, tmp)) {
        tmp = a;
        len = j;
      }
    }
    tmp.first -= (2 * len + 1) * 1LL * arr[i];
    if (compare(tmp, res)) {
      res = tmp;
      ans = make_pair(len, make_pair(i, 0));
    }
  }
  cout << ans.first * 2 + 1 + ans.second.second << "\n";
  printf("%I64d", arr[ans.second.first]);
  if (ans.second.second) printf(" %I64d", arr[ans.second.first + 1]);
  for (int i = 0; i < ans.first; i++) {
    printf(" %I64d", arr[ans.second.first - i - 1]);
    printf(" %I64d", arr[n - i - 1]);
  }
  return 0;
}