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 s[200010];
long long qz[200010];
int main() {
  int N, T, cas = 0;
  long double ans = 0;
  int ansI, ansC;
  bool ansB;
  scanf("%d", &N);
  for (int i = 1; i <= N; i++) {
    scanf("%d", s + i);
  }
  sort(s + 1, s + N + 1);
  for (int i = 1; i <= N; i++) {
    qz[i] = qz[i - 1] + s[i];
  }
  for (int i = 2; i < N; i++) {
    int l = 1, r = min(N - i, i - 1), mid1, mid2;
    long double max1, max2, maxL, maxR;
    while (r - l > 2) {
      mid1 = (l + l + r) / 3, mid2 = (l + r + r) / 3;
      max1 = (long double)(qz[i] - qz[i - mid1 - 1] + qz[N] - qz[N - mid1]) /
             (mid1 + mid1 + 1);
      max2 = (long double)(qz[i] - qz[i - mid2 - 1] + qz[N] - qz[N - mid2]) /
             (mid2 + mid2 + 1);
      if (max1 < max2)
        l = mid1;
      else
        r = mid2;
    }
    maxL =
        (long double)(qz[i] - qz[i - l - 1] + qz[N] - qz[N - l]) / (l + l + 1);
    maxR =
        (long double)(qz[i] - qz[i - r - 1] + qz[N] - qz[N - r]) / (r + r + 1);
    mid1 = (l + l + r) / 3, mid2 = (l + r + r) / 3;
    max1 = (long double)(qz[i] - qz[i - mid1 - 1] + qz[N] - qz[N - mid1]) /
           (mid1 + mid1 + 1);
    max2 = (long double)(qz[i] - qz[i - mid2 - 1] + qz[N] - qz[N - mid2]) /
           (mid2 + mid2 + 1);
    if (max1 > maxL) l = mid1, maxL = max1;
    if (max2 > maxL) l = mid2, maxL = max2;
    if (maxR > maxL) l = r, maxL = maxR;
    if (ans < maxL - s[i]) {
      ans = maxL - s[i];
      ansI = i;
      ansC = l + l + 1;
      ansB = 0;
    }
  }
  if (ans < 1e-8) {
    printf("1\n%d", s[1]);
  } else {
    printf("%d\n", ansC);
    if (ansB) {
      for (int i = 1; i <= ansC / 2; i++) printf("%d ", s[i]);
      for (int i = 0; i <= ansC / 2; i++) printf("%d ", s[i + ansI]);
    } else {
      for (int i = ansI - (ansC / 2); i <= ansI; i++) printf("%d ", s[i]);
      for (int i = N - (ansC / 2) + 1; i <= N; i++) printf("%d ", s[i]);
    }
  }
  return 0;
}