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 MOD = 1e9 + 7;
const int C = 26;
void add(int &x, int y) {
  x += y;
  while (x >= MOD) x -= MOD;
  while (x < 0) x += MOD;
}
int fix(int x) {
  while (x >= MOD) x -= MOD;
  while (x < 0) x += MOD;
  return x;
}
int pw(int a, int b) {
  int ret = 1;
  while (b) {
    if (b & 1) ret = 1ll * ret * a % MOD;
    b >>= 1;
    a = 1ll * a * a % MOD;
  }
  return ret;
}
const int MAXN = 2e5 + 10;
int n, a[MAXN];
long long pre[MAXN];
long double go(int i, int len) {
  return (long double)((pre[n] - pre[n - len]) + (pre[i + 1] - pre[i - len])) /
             (2 * len + 1) -
         a[i];
}
void solve() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  if (n <= 2) {
    cout << n << "\n";
    for (int i = 0; i < n; i++) {
      cout << a[i] << " ";
    }
    cout << "\n";
    return;
  }
  for (int i = 0; i < n; i++) {
    pre[i + 1] = pre[i] + a[i];
  }
  tuple<long double, int, int> best = {0, 0, 0};
  for (int i = 1; i < n - 1; i++) {
    int l = 1, r = min(i, n - 1 - i);
    while (r - l > 2) {
      int nl = l + (r - l) / 3, nr = l + 2 * (r - l) / 3;
      if (go(i, nl) < go(i, nr))
        l = nl;
      else
        r = nr;
    }
    for (int j = l; j <= r; j++) {
      best = max(best, make_tuple(go(i, j), i, j));
    }
  }
  vector<int> ans;
  int i = get<1>(best), len = get<2>(best);
  for (int j = i - len; j <= i; j++) {
    ans.push_back(a[j]);
  }
  for (int j = n - len; j < n; j++) {
    ans.push_back(a[j]);
  }
  cout << ans.size() << "\n";
  for (int x : ans) {
    cout << x << " ";
  }
  cout << "\n";
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int te = 1;
  for (int w = 1; w <= te; w++) {
    solve();
  }
  return 0;
}