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>
inline T BM(T p, T e, T M) {
  long long int ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % M;
    p = (p * p) % M;
  }
  return (T)ret;
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T mdINV(T a, T M) {
  return BM(a, M - 2, M);
}
template <class T>
inline T PW(T p, T e) {
  long long int ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p);
    p = (p * p);
  }
  return (T)ret;
}
template <class T>
string NTS(T Number) {
  stringstream ss;
  ss << Number;
  return ss.str();
}
template <class T>
T stringtonumber(const string &Text) {
  istringstream ss(Text);
  T result;
  return ss >> result ? result : 0;
}
template <class T>
bool ISLEFT(T a, T b, T c) {
  if (((a.first.first - b.first.first) * (b.second.second - c.second.second) -
       (b.first.first - c.first.first) * (a.second.second - b.second.second)) <
      0.0)
    return 1;
  else
    return 0;
}
int n;
int a[200000 + 4];
double cum[200000 + 2];
double his(long long int mid, long long int ko) {
  double first = cum[n] - cum[n - ko];
  first += cum[mid] - cum[mid - 1 - ko];
  first = first / (double)(2 * (double)ko + 1);
  first -= (double)a[mid];
  return first;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  sort(a + 1, a + n + 1);
  cum[0] = 0;
  for (long long int i = 1; i <= n; i++) {
    cum[i] = (cum[i - 1] + (double)a[i]);
  }
  double res = 0;
  int in = 1;
  int num = 0;
  for (int i = 1; i <= n; i++) {
    int x1 = min(i - 1, n - i);
    int lo = 1;
    int hi = x1;
    for (int j = 1; j <= 200; j++) {
      int first = (hi - lo) / 3;
      int mid = (lo + first);
      int mid1 = (hi - first);
      double val = his(i, mid);
      double val1 = his(i, mid1);
      if (val < val1)
        lo = mid;
      else
        hi = mid1;
    }
    lo = max(0, lo - 10);
    hi = min(x1, hi + 10);
    assert(hi - lo <= 100);
    for (int j = lo; j <= hi; j++) {
      double ho = his(i, j);
      if (ho > res) {
        res = ho;
        in = i;
        num = j;
      }
    }
  }
  int lo = in - num;
  int hi = in + num;
  cout << hi - lo + 1 << endl;
  int ar[hi - lo + 2];
  int sz1 = 0;
  for (int i = lo; i <= in; i++) {
    ar[++sz1] = a[i];
  }
  for (int j = n; j > n - num; j--) ar[++sz1] = a[j];
  for (int i = 1; i <= sz1; i++) {
    if (i == 1)
      printf("%d", ar[i]);
    else
      printf(" %d", ar[i]);
  }
  printf("\n");
  return 0;
}