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;
inline int Read() {
  char c = getchar();
  int num = 0;
  while ('0' > c || c > '9') c = getchar();
  while ('0' <= c && c <= '9') num = num * 10 + c - '0', c = getchar();
  return (num);
}
long long sm[200010];
long double ans;
int n, a[200010], ps = 1, lg = 0;
inline long double Cal(int p, int l) {
  long long L = sm[p - 1] - sm[p - 1 - l];
  long long R = sm[n] - sm[n - l];
  return ((long double)(L + R + a[p]) / (long double)(l * 2 + 1));
}
int main() {
  n = Read();
  for (int i = 1; i <= n; i++) a[i] = Read();
  sort(a + 1, a + 1 + n);
  if (n <= 2) {
    printf("%d\n", n);
    for (int i = 1; i <= n; i++) printf("%d ", a[i]);
    puts("");
    return (0);
  }
  for (int i = 1; i <= n; i++) sm[i] = sm[i - 1] + a[i];
  for (int i = 2; i < n; i++) {
    long double nm = 0;
    int l = 1, r = min(i - 1, n - i), ln = 0;
    while (r - l >= 3) {
      int ml = l + (r - l) / 3, mr = l + (r - l) / 3 * 2;
      long double nl = Cal(i, ml);
      long double nr = Cal(i, mr);
      if (nl < nr) {
        if (nm < nr) nm = nr, ln = mr;
        l = ml + 1;
      } else {
        if (nm < nl) nm = nl, ln = ml;
        r = mr - 1;
      }
    }
    for (int j = l; j <= r; j++) {
      long long L = sm[i - 1] - sm[i - j - 1];
      long long R = sm[n] - sm[n - j];
      long double rs = (long double)(L + R + a[i]) / (long double)(j * 2 + 1);
      if (rs > nm) nm = rs, ln = j;
    }
    if ((nm - a[i]) - ans > 0) ans = nm - a[i], ps = i, lg = ln;
  }
  printf("%d\n", lg * 2 + 1);
  for (int i = lg; i >= 1; i--) printf("%d ", a[ps - i]);
  printf("%d ", a[ps]);
  for (int i = lg; i >= 1; i--) printf("%d ", a[n - i + 1]);
  puts("");
}