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;
template <class T>
T inline sqr(T x) {
  return x * x;
}
const long double pi = 3.1415926535897932384626433832795;
const long double eps = 1e-8;
bool le(pair<long long, long long> a, pair<long long, long long> b) {
  return a.first * b.second < a.second * b.first;
}
const int N = 200500;
long long a[N];
long long pref[N];
int n;
long long sum(int l, int r) {
  long long res = 0;
  if (r) res += pref[r - 1];
  if (l) res -= pref[l - 1];
  return res;
}
void pr(pair<long long, long long> a) {
  cerr << a.first << " " << a.second << endl;
}
pair<long long, long long> solve() {
  sort(a, a + n);
  pref[0] = a[0];
  for (int i = 1; i <= (int)(n - 1); ++i) pref[i] = pref[i - 1] + a[i];
  pair<long long, long long> best1(-1, 1);
  int med1, l1;
  for (int med = 0; med < n; med++) {
    int l = 0, r = min(med, n - med - 1) + 1;
    while (l + 1 < r) {
      int m = (l + r) / 2;
      pair<long long, long long> cur(
          sum(med - m, med) + sum(n - m, n) + a[med] - a[med] * (m + m + 1),
          m + m + 1);
      m--;
      pair<long long, long long> prev(
          sum(med - m, med) + sum(n - m, n) + a[med] - a[med] * (m + m + 1),
          m + m + 1);
      m++;
      if (le(prev, cur))
        l = m;
      else
        r = m;
    }
    pair<long long, long long> cur(
        sum(med - l, med) + sum(n - l, n) + a[med] - a[med] * (l + l + 1),
        l + l + 1);
    if (le(best1, cur)) {
      best1 = cur;
      med1 = med;
      l1 = l;
    }
  }
  cout << l1 + l1 + 1 << "\n";
  for (int i = med1 - l1; i <= med1; i++) cout << a[i] << " ";
  for (int i = n - l1; i < n; i++) cout << a[i] << " ";
  return best1;
}
void test(int x) {
  n = x;
  for (int tt = 0; tt < (int)(1000000); ++tt) {
    for (int i = 0; i < (int)(n); ++i) a[i] = rand() % 10;
    pair<long long, long long> best(-1, 1);
    for (int msk = 1; msk <= (int)((1 << n) - 1); ++msk) {
      pair<long long, long long> cur;
      vector<int> c;
      for (int i = 0; i < (int)(n); ++i)
        if (msk & (1 << i)) {
          c.push_back(a[i]);
        }
      sort((c).begin(), (c).end());
      if (c.size() % 2 == 1) {
        cur.second = c.size();
        cur.first =
            accumulate((c).begin(), (c).end(), 0) - c.size() * c[c.size() / 2];
      } else {
        cur.second = c.size();
        cur.first = accumulate((c).begin(), (c).end(), 0) -
                    c.size() / 2 * (c[c.size() / 2] + c[c.size() / 2 - 1]);
      }
      if (le(best, cur)) best = cur;
    }
    pair<long long, long long> x = solve();
    if (le(x, best) || le(best, x)) {
      pr(x);
      pr(best);
      for (int i = 0; i < (int)(n); ++i) cerr << a[i] << " ";
      assert(false);
    }
  }
  exit(0);
}
int main() {
  cout.precision(10);
  cout << fixed;
  srand(time(NULL));
  ios::sync_with_stdio(false);
  scanf("%d", &n);
  for (int i = 0; i < (int)(n); ++i) {
    int x;
    scanf("%d", &x);
    a[i] = x;
  }
  solve();
  return 0;
}