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 N = 1e6 + 50;
long long mod = 1e9 + 7;
const int lim = 700;
const int lg = 18;
const int base = 311;
const long double eps = 1e-6;
long long a[N], sum[N];
long long n;
struct viet {
  long long u, v;
  bool operator<(const viet &o) const { return v * o.u > u * o.v; }
};
viet get(long long mid, long long tot) {
  return {sum[mid] - sum[mid - tot - 1] + sum[n] - sum[n - tot] -
              a[mid] * (tot * 2 + 1),
          (tot * 2 + 1)};
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  if (fopen("tests.inp", "r")) {
    freopen("test.inp", "r", stdin);
    freopen("test.out", "w", stdout);
  }
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++) sum[i] = sum[i - 1] + a[i];
  viet ans = {-1, 1};
  long long tot, best;
  for (int i = 1; i <= n; i++) {
    long long l = 0, h = min(1ll * i - 1, n - i) - 1;
    while (l <= h) {
      long long mid = (l + h) >> 1;
      if (get(i, mid) < get(i, mid + 1))
        l = mid + 1;
      else
        h = mid - 1;
    }
    viet res = get(i, l);
    if (ans < res) {
      ans = res;
      tot = l;
      best = i;
    }
  }
  cout << tot * 2 + 1 << '\n';
  for (int i = best - tot; i <= best; i++) cout << a[i] << " ";
  for (int i = n - tot + 1; i <= n; i++) cout << a[i] << " ";
}