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 maxn = 2e5 + 10;
const long double inf = 1e9;
int x[maxn], n;
long long s[maxn];
long double f1(int m, int k) {
  long double su = x[m] + s[m - 1] - s[m - 1 - k] + s[n] - s[n - k];
  int c = 1 + k + k;
  return su / c - x[m];
}
long double f2(int m1, int m2, int k) {
  long double su = x[m1] + x[m2] + s[m1 - 1] - s[m1 - 1 - k] + s[n] - s[n - k];
  int c = 2 + k + k;
  return su / c - (x[m1] + x[m2]) * 1.0 / 2;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> x[i];
  sort(x + 1, x + 1 + n);
  for (int i = 1; i <= n; ++i) s[i] = s[i - 1] + x[i];
  long double ans1 = -inf;
  int p1 = -1, z1 = -1;
  for (int i = 1; i <= n; ++i) {
    int d = 31, j = 0;
    while (d--)
      if (i - 1 - (j + (1 << d)) + 1 >= 1 && n - (j + (1 << d)) + 1 > i) {
        int to = j + (1 << d);
        if (f1(i, to - 1) < f1(i, to)) j += (1 << d);
      }
    long double fi = f1(i, j);
    if (fi > ans1) ans1 = fi, p1 = i, z1 = j;
  }
  long double ans2 = -inf;
  int p2 = -1, z2 = -1;
  for (int i = 1; i < n; ++i) {
    int d = 31, j = 0;
    while (d--)
      if (i - 1 - (j + (1 << d)) + 1 >= 1 && n + 1 - (j + (1 << d)) > i + 1) {
        int to = j + (1 << d);
        if (f2(i, i + 1, to - 1) < f2(i, i + 1, to)) j += (1 << d);
      }
    long double fi = f2(i, i + 1, j);
    if (fi > ans2) ans2 = fi, p2 = i, z2 = j;
  }
  if (ans1 > ans2) {
    cout << z1 * 2 + 1 << endl;
    for (int i = p1 - z1; i < p1; ++i) cout << x[i] << ' ';
    cout << x[p1] << ' ';
    for (int i = n + 1 - z1; i <= n; ++i) cout << x[i] << ' ';
    cout << endl;
  } else {
    cout << z2 * 2 + 2 << endl;
    for (int i = p2 - z2; i < p2; ++i) cout << x[i] << ' ';
    cout << x[p1] << ' ' << x[p1 + 1] << ' ';
    for (int i = n + 1 - z2; i <= n; ++i) cout << x[i] << ' ';
    cout << endl;
  }
  return 0;
}