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, m, x, y, z, k, w;
long long A[200005], sum[200005];
long long X, Y, ans, median;
int a, b, c;
void calc(int x, int y, int l) {
  long long s = sum[n] - sum[n - l] + sum[y] - sum[x - l - 1];
  long long nums = 2ll * (long long)(l) + (long long)(y - x + 1);
  if ((s - median * nums) * Y >= X * nums) {
    X = s - median * nums;
    Y = nums;
    a = x;
    b = y;
    c = l;
  }
}
void bs(int x, int y) {
  int low = 0;
  int high = min(n - y, x - 1);
  int mid;
  long long nums, s, t;
  while (high - low > 1) {
    mid = (high + low) / 2;
    s = sum[n] - sum[n - mid] + sum[y] - sum[x - mid - 1];
    t = A[n - mid] + A[x - mid - 1];
    nums = 2ll * (long long)(mid) + (long long)(y - x + 1);
    if (s * 2ll > t * nums)
      high = mid;
    else
      low = mid;
  }
  calc(x, y, low);
  calc(x, y, high);
}
void output(int x, int y, int k) {
  long long ANS[200005];
  int w = 0;
  for (int i = (x - k); i <= (y); i++) ANS[w++] = A[i];
  for (int i = (n - k + 1); i <= (n); i++) ANS[w++] = A[i];
  printf("%d\n", w);
  for (int i = (0); i < (w); i++)
    if (i == w - 1)
      printf("%I64d\n", ANS[i] / 2);
    else
      printf("%I64d ", ANS[i] / 2);
}
int main() {
  scanf("%d", &n);
  for (int i = (1); i <= (n); i++) {
    scanf("%I64d", &A[i]);
    A[i] = A[i] + A[i];
  }
  sort(A + 1, A + n + 1);
  for (int i = (1); i <= (n); i++) sum[i] = sum[i - 1] + A[i];
  X = 0ll;
  Y = 1ll;
  for (int i = (1); i <= (n); i++) {
    median = A[i];
    bs(i, i);
  }
  for (int i = (1); i < (n); i++) {
    median = (A[i] + A[i + 1]) / 2;
    bs(i, i + 1);
  }
  output(a, b, c);
  return 0;
}