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;
const int INF = (int)1E9;
int N, a[200005];
long long s[200005];
struct sol {
  long long sum, med;
  int c;
  sol() {}
  sol(long long _sum, int _c, long long _med, int _c2) {
    sum = _sum;
    med = _med;
    c = _c;
    sum *= 2;
    if (_c2 == 1) {
      med *= 2;
    }
  }
  bool operator>(const sol &ano) const {
    return sum * ano.c - med * ano.c * c > ano.sum * c - ano.med * ano.c * c;
  }
};
struct frac {
  long long a;
  int b;
  frac(long long _a, int _b) {
    a = _a;
    b = _b;
  }
  bool operator<=(const frac &ano) const { return a * ano.b <= b * ano.a; }
};
sol best;
int ansi = -1, anslen, anstype;
long long getSum(int l, int r) { return s[r] - s[l - 1]; }
frac eval(int i, int len, long long iS, int ic) {
  long long S = iS + getSum(i - len, i - 1) + getSum(N - len + 1, N);
  int c = 2 * len + ic;
  return frac(S, c);
}
void solve(int i, int maxcnt, long long iS, int ic) {
  if (maxcnt <= 0) return;
  int l = 1, r = maxcnt;
  while (l <= r) {
    int m = (l + r) / 2;
    if (eval(i, m - 1, iS, ic) <= eval(i, m, iS, ic))
      l = m + 1;
    else
      r = m - 1;
  }
  int alen = r;
  if (r == 0) return;
  frac f = eval(i, alen, iS, ic);
  sol cur = sol(f.a, f.b, iS, ic);
  if (cur.sum <= cur.med * cur.c) return;
  if (ansi == -1 || cur > best) {
    best = cur;
    ansi = i;
    anstype = ic;
    anslen = alen;
  }
}
int main() {
  cin >> N;
  for (int i = (1); i < (N + 1); i++) scanf("%d", a + i);
  sort(a + 1, a + 1 + N);
  for (int i = (1); i < (N + 1); i++) s[i] = s[i - 1] + a[i];
  for (int i = (1); i < (N + 1); i++) {
    int maxcnt = min(i - 1, N - i);
    solve(i, maxcnt, a[i], 1);
    if (i < N) {
      maxcnt = min(i - 1, N - (i + 1));
      solve(i, maxcnt, a[i] + a[i + 1], 2);
    }
  }
  if (ansi == -1) {
    printf("1\n%d\n", a[1]);
    return 0;
  }
  printf("%d\n", anslen * 2 + anstype);
  for (int i = (ansi); i < (ansi + anstype); i++) printf("%d ", a[i]);
  for (int i = (1); i < (anslen + 1); i++) {
    printf("%d %d ", a[ansi - i], a[N - i + 1]);
  }
  puts("");
  return 0;
}