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>
#pragma warning(disable : 4996)
using namespace std;
int IT_MAX = 131072;
const long long MOD = 1000000007;
const int INF = 1034567891;
const long long LL_INF = 2234567890123456789ll;
const double PI = 3.141592653589793238;
const long double ERR = 1E-6;
long long in[200050];
long long sum[200050];
int main() {
  int N, i, j;
  scanf("%d", &N);
  for (i = 1; i <= N; i++) scanf("%lld", &in[i]);
  sort(in + 1, in + N + 1);
  for (i = 1; i <= N; i++) sum[i] = sum[i - 1] + in[i];
  long long mxa = 0, mxb = 1, ans1 = 1, ans2 = 0;
  for (i = 2; i <= N; i++) {
    int st = 1, en = min(i - 1, N - i), mi, rv = 0;
    while (st <= en) {
      mi = (st + en) / 2;
      long long a1 = sum[N] - sum[N - mi] + sum[i] - sum[i - 1 - mi],
                b1 = 2 * mi + 1;
      a1 -= in[i] * b1;
      long long a2 = sum[N] - sum[N - mi + 1] + sum[i] - sum[i - mi],
                b2 = 2 * mi - 1;
      a2 -= in[i] * b2;
      if (a1 > 0 && a1 * b2 > b1 * a2) {
        rv = mi;
        st = mi + 1;
      } else
        en = mi - 1;
    }
    long long a = sum[N] - sum[N - rv] + sum[i] - sum[i - 1 - rv],
              b = 2 * rv + 1;
    a -= b * in[i];
    if (mxa * b < mxb * a) {
      ans1 = i, ans2 = rv;
      mxa = a, mxb = b;
    }
  }
  printf("%lld\n", ans2 * 2 + 1);
  for (i = ans1 - ans2; i <= ans1; i++) printf("%lld ", in[i]);
  for (i = N - ans2 + 1; i <= N; i++) printf("%lld ", in[i]);
  printf("\n");
  return 0;
}