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;
inline int nxt() {
  int first;
  scanf("%d", &first);
  return first;
}
struct Ans {
  vector<int> a;
  double val;
  Ans(double val = 0) : val(val) {}
  Ans(const vector<int>& a, double val) : a(a), val(val) {}
  bool operator<(const Ans& first) const { return val < first.val; }
  bool operator>(const Ans& first) const { return val > first.val; }
  void out() {
    sort((a).begin(), (a).end());
    printf("%d\n", (int)a.size());
    for (auto first : a) printf("%d ", first);
    puts("");
  }
};
double get_res(vector<int> a) {
  sort((a).begin(), (a).end());
  int n = a.size();
  double med = (n % 2 ? a[n / 2] : 0.5 * (a[n / 2] + a[n / 2 - 1]));
  double avg = 1.0 * accumulate((a).begin(), (a).end(), 0) / n;
  return fabs(med - avg);
}
void solve(vector<int> a) {
  int n = a.size();
  sort((a).begin(), (a).end());
  double ans = 0;
  int qw = 0, rad = 0;
  vector<long long> S(n + 1);
  for (int i = 0; i < n; i++) S[i + 1] = S[i] + a[i];
  for (int i = 1; i < n - 1; i++) {
    int l = 1;
    int r = min(i, n - 1 - i) + 1;
    while (r > l + 1) {
      int mid = (l + r) / 2;
      double avg =
          1.0 * (S[i + 1] - S[i - mid] + S[n] - S[n - mid]) / (2 * mid + 1);
      double md = (a[i - mid] + a[n - mid]) * 0.5;
      if (md < avg)
        r = mid;
      else
        l = mid;
    }
    double avg = 1.0 * (S[i + 1] - S[i - l] + S[n] - S[n - l]) / (2 * l + 1);
    if (avg - a[i] > ans) {
      ans = avg - a[i];
      qw = i;
      rad = l;
    }
  }
  cout.sync_with_stdio(0);
  cout << 2 * rad + 1 << "\n";
  for (int i = qw - rad; i <= qw; i++) cout << a[i] << " ";
  for (int i = n - rad; i < n; i++) {
    cout << a[i] << " ";
  }
  cout << "\n";
}
double stupid(vector<int> a) {
  int n = a.size();
  int N = (1 << n);
  double res = 0;
  for (int mask = 1; mask < N; mask++) {
    vector<int> qw;
    for (int i = 0; i < n; i++) {
      if (mask & (1 << i)) {
        qw.push_back(a[i]);
      }
    }
    sort((qw).begin(), (qw).end());
    int sz = qw.size();
    double med = (sz % 2 ? qw[sz / 2] : 0.5 * (qw[sz / 2] + qw[sz / 2 - 1]));
    double avg = 1.0 * accumulate((qw).begin(), (qw).end(), 0) / sz;
    double cur = fabs(med - avg);
    if (cur > res) {
      res = cur;
    }
  }
  return res;
}
int main() {
  int n = nxt();
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    a[i] = nxt();
  }
  solve(a);
  return 0;
}