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 = 2e5 + 5;
int n, a[N], o, R;
long long pre[N];
int read() {
  int x = 0, f = 1;
  char s;
  while ((s = getchar()) > '9' || s < '0')
    if (s == '-') f = -1;
  while (s >= '0' && s <= '9')
    x = (x << 1) + (x << 3) + (s ^ 48), s = getchar();
  return x * f;
}
pair<long long, long long> f(const int x, const int i) {
  return make_pair(pre[i] - pre[i - x - 1] + pre[n] - pre[n - x], x * 2 + 1);
}
bool cmp(const pair<long long, long long> x,
         const pair<long long, long long> y) {
  return 1ll * x.first * y.second - 1ll * x.second * y.first > 0;
}
long long gcd(long long x, long long y) {
  if (!y) return x;
  return gcd(y, x % y);
}
pair<long long, long long> Do(const pair<long long, long long> x) {
  long long g = gcd(x.first, x.second);
  return make_pair(x.first / g, x.second / g);
}
pair<long long, long long> dec(const pair<long long, long long> x,
                               const pair<long long, long long> y) {
  pair<long long, long long> t =
      make_pair(1ll * x.first * y.second - 1ll * x.second * y.first,
                1ll * x.second * y.second);
  return Do(t);
}
int main() {
  int l, r, left, right, len;
  pair<long long, long long> ans1, ans2, ans, res = make_pair(-1, 1);
  n = read();
  for (int i = 1; i <= n; ++i) a[i] = read();
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; ++i) pre[i] = pre[i - 1] + a[i];
  for (int i = 1; i <= n; ++i) {
    l = 0, r = min(i - 1, n - i) + 1;
    ans = make_pair(-1, 1);
    while (l < r) {
      left = l + r >> 1, right = left + r >> 1;
      ans1 = f(left, i), ans2 = f(right, i);
      ans1 = Do(ans1);
      ans2 = Do(ans2);
      if (cmp(ans2, ans1)) {
        l = left;
        if (cmp(ans2, ans)) ans = ans2, len = right;
      } else {
        r = right;
        if (cmp(ans1, ans)) ans = ans1, len = left;
      }
    }
    ans = dec(ans, make_pair(a[i], 1));
    if (cmp(ans, res)) o = i, R = len, res = ans;
  }
  printf("%d\n", 2 * R + 1);
  for (int i = o - R; i <= o; ++i) printf("%d ", a[i]);
  for (int i = n; i > n - R; --i) printf("%d ", a[i]);
  puts("");
  return 0;
}