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;
long long bigadd(long long &a, long long &b) {
  a += b % 1000000007;
  while (a < 0) a += 1000000007;
  a %= 1000000007;
}
long long bigpow(long long a, long long b) {
  long long res = 1;
  a %= 1000000007;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % 1000000007;
    a = a * a % 1000000007;
  }
  return res;
}
void main2();
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  main2();
  return 0;
}
int N;
struct Fraction {
  long long a;
  long long b;
  inline bool operator<(const Fraction &other) const {
    return a * other.b < b * other.a;
  }
  Fraction(long long _a, long long _b) : a(_a), b(_b) {}
};
vector<int> x;
vector<long long> y;
long long get(int start, int end) {
  if (start > end) return 0LL;
  if (start == 0) {
    return y[end];
  } else {
    return y[end] - y[start - 1];
  }
}
Fraction f(int len, int i) {
  int start = i - len, end = i;
  return Fraction(get(start, end) + get(N - len, N - 1), len * 2LL + 1LL);
}
void main2() {
  scanf("%d", &N);
  x = vector<int>(N);
  for (int(i) = 0; (i) < (int)(N); (i)++) scanf("%d", &x[i]);
  sort(x.begin(), x.end());
  Fraction ans = Fraction(0, 1);
  int ansi = 0, anslen = 0;
  for (auto i : x)
    if (y.empty())
      y.push_back((long long)i);
    else
      y.push_back(y.back() + (long long)i);
  for (int i = 0; i < N; i++) {
    int len = min(i, N - 1 - i);
    int l = 0, r = len;
    while (r - l > 3) {
      int nl = (l + l + r) / 3, nr = (l + r + r) / 3;
      if (f(nl, i) < f(nr, i)) {
        l = nl;
      } else {
        r = nr;
      }
    }
    for (int fl = l; fl <= r; fl++) {
      Fraction cur = f(fl, i);
      cur.a -= cur.b * (long long)x[i];
      if (ans < cur) {
        ansi = i;
        ans = cur;
        anslen = fl;
      }
    }
  }
  vector<int> ret;
  for (int i = ansi - anslen; i <= ansi; i++) ret.push_back(x[i]);
  for (int i = N - anslen; i <= N - 1; i++) ret.push_back(x[i]);
  printf("%d\n", (int)ret.size());
  for (auto i : ret) printf("%d\n", i);
}