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;
using ll = long long;
using ld = long double;
using ii = pair<int, int>;
using vi = vector<int>;
using vb = vector<bool>;
using vvi = vector<vi>;
using vii = vector<ii>;
using vvii = vector<vii>;
const int INF = 2000000000;
const ll LLINF = 9000000000000000000;
ld solveodd(vector<ll> &A, vector<ll> &S, int N, vi &out) {
  int l = 0;
  ll sum = 0LL;
  ld opt = -LLINF;
  int lopt = -1, ropt = -1;
  for (int r = 0; r < N; ++r) {
    sum += A[r];
    while (N - (r - l) <= r) {
      sum -= A[l];
      ++l;
    }
    while (l < r && (ld(S[r - l] + sum) / ld(2 * (r - l) + 1) <
                     ld(S[r - l - 1] + sum - A[l]) / ld(2 * (r - l) - 1))) {
      sum -= A[l];
      ++l;
    }
    if (ld(S[r - l] + sum) / ld(2 * (r - l) + 1) - A[r] > opt) {
      lopt = l;
      ropt = r;
      opt = ld(S[r - l] + sum) / ld(2 * (r - l) + 1) - A[r];
    }
  }
  for (int i = lopt; i <= ropt; ++i) out.push_back(i);
  for (int i = max(ropt + 1, N - (ropt - lopt)); i < N; ++i) out.push_back(i);
  return opt;
}
ld solveeven(vector<ll> &A, vector<ll> &S, int N, vi &out) {
  int l = 0;
  ll sum = 0LL;
  ld opt = -LLINF;
  int lopt = -1, ropt = -1;
  for (int r = 0; r < N - 1; ++r) {
    sum += A[r];
    while (N - (r - l) - 1 <= r) {
      sum -= A[l];
      ++l;
    }
    while (l < r && (ld(S[r - l + 1] + sum) / ld(2 * (r - l + 1)) -
                         0.5 * A[N - (r - l) - 1] <
                     ld(S[r - l] + sum - A[l]) / ld(2 * (r - l)) -
                         0.5 * A[N - (r - l)])) {
      sum -= A[l];
      ++l;
    }
    if (ld(S[r - l + 1] + sum) / ld(2 * (r - l + 1)) -
            0.5 * (A[r] + A[N - (r - l) - 1]) >
        opt) {
      lopt = l;
      ropt = r;
      opt = ld(S[r - l + 1] + sum) / ld(2 * (r - l + 1)) -
            0.5 * (A[r] + A[N - (r - l) - 1]);
    }
  }
  for (int i = lopt; i <= ropt; ++i) out.push_back(i);
  for (int i = max(ropt + 1, N - (ropt - lopt) - 1); i < N; ++i)
    out.push_back(i);
  return opt;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int N;
  cin >> N;
  vector<ll> A(N, 0LL);
  for (int i = 0; i < N; ++i) cin >> A[i];
  sort(A.begin(), A.end());
  vector<ll> S(N + 1, 0LL);
  S[0] = 0LL;
  for (int i = 1; i <= N; ++i) S[i] = S[i - 1] + A[N - i];
  vi evopt, odopt;
  ld odd = solveodd(A, S, N, odopt);
  ld even = (N > 1 ? solveeven(A, S, N, evopt) : -LLINF);
  if (odd > even) {
    cout << odopt.size() << endl;
    for (size_t i = 0; i < odopt.size(); ++i)
      cout << A[odopt[i]] << " \n"[i + 1 == odopt.size()];
  } else {
    cout << evopt.size() << endl;
    for (size_t i = 0; i < evopt.size(); ++i)
      cout << A[evopt[i]] << " \n"[i + 1 == evopt.size()];
  }
  return 0;
}