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 long long INF = 0x3f3f3f3f3f3f3f3fLL;
const int inf = 0x3f3f3f3f;
const int maxn = 2e5 + 10;
const double eps = 1e-6;
int di[8][2] = {{-1, 0},  {1, 0},  {0, -1}, {0, 1},
                {-1, -1}, {-1, 1}, {1, -1}, {1, 1}};
inline long long rd() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 3) + (x << 1) + (ch ^ 48);
    ch = getchar();
  }
  return x * f;
}
int n;
pair<int, int> a[maxn];
long long sum[maxn];
double ans = -1;
int s, len, l1;
long long get(int l, int r) { return sum[r] - sum[l - 1]; }
void f(int r, long long v, int num, int p) {
  int l = 0;
  double res = -1;
  double a1 = 1.0 * v / num;
  while (l <= r) {
    int lmid = l + (r - l) / 3, rmid = r - (r - l) / 3;
    double lans = (v + get(p - lmid, p - 1) + get(n - lmid + 1, n)) * 1.0 /
                      (2 * lmid + num) -
                  a1;
    double rans = (v + get(p - rmid, p - 1) + get(n - rmid + 1, n)) * 1.0 /
                      (2 * rmid + num) -
                  a1;
    if (lans > rans) {
      res = max(res, lans);
      r = rmid - 1;
      if (lans > ans) {
        ans = lans;
        s = p;
        l1 = num;
        len = lmid;
      }
    } else {
      res = max(res, rans);
      l = lmid + 1;
      if (rans > ans) {
        ans = rans;
        s = p;
        l1 = num;
        len = rmid;
      }
    }
  }
}
int c[maxn];
int v[maxn];
int main() {
  n = rd();
  for (int i = 1; i <= n; i++) {
    c[i] = a[i].first = rd();
    a[i].second = i;
  }
  sort(a + 1, a + 1 + n);
  for (int i = 1; i <= n; i++) sum[i] = sum[i - 1] + a[i].first;
  for (int i = 1; i <= n; i++) {
    f(min(i - 1, n - i), a[i].first, 1, i);
    if (i != n) f(min(i - 1, n - i - 1), a[i].first + a[i + 1].first, 2, i);
  }
  for (int i = s - len; i < s; i++) v[a[i].second] = 1;
  for (int i = n; i >= n - len + 1; i--) v[a[i].second] = 1;
  for (int i = s; i <= s + l1 - 1; i++) v[a[i].second] = 1;
  printf("%d\n", len * 2 + l1);
  for (int i = 1; i <= n; i++)
    if (v[i]) printf("%d ", c[i]);
}