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.
#include <bits/stdc++.h>
using namespace std;
template <class C>
void mini(C &a4, C b4) {
  a4 = min(a4, b4);
}
template <class C>
void maxi(C &a4, C b4) {
  a4 = max(a4, b4);
}
template <class TH>
void _dbg(const char *sdbg, TH h) {
  cerr << sdbg << "=" << h << "\n";
}
template <class TH, class... TA>
void _dbg(const char *sdbg, TH h, TA... a) {
  while (*sdbg != ',') cerr << *sdbg++;
  cerr << "=" << h << ",";
  _dbg(sdbg + 1, a...);
}
long long sp[200010];
long long t[200010];
long long n;
struct wyn {
  long long il, sum, med;
  wyn(long long me, long long ill) {
    il = ill * 2 + 1;
    med = t[me];
    sum = sp[n] - sp[n - ill] + sp[me + 1] - sp[me - ill];
  }
  wyn(){};
};
bool cmp(wyn a, wyn b) {
  return a.sum * b.il - a.med * a.il * b.il <
         b.sum * a.il - b.med * a.il * b.il;
}
wyn naj;
void akwyn(wyn pom) {
  if (cmp(naj, pom)) naj = pom;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(11);
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> t[i];
  }
  sort(t, t + n);
  for (long long i = 0; i < n; i++) {
    sp[i + 1] = sp[i] + t[i];
  }
  naj.il = 1;
  naj.sum = t[0];
  naj.med = t[0];
  for (long long i = 0; i < n; i++) {
    long long po = 0, ko = min(i, n - i - 1);
    while (po + 1 < ko) {
      long long m1 = (po + ko) / 2;
      long long m2 = m1 + 1;
      wyn m1w(i, m1);
      wyn m2w(i, m2);
      if (cmp(m1w, m2w)) {
        po = m2;
      } else {
        ko = m1;
      }
    }
    wyn pw(i, po);
    akwyn(pw);
    wyn kw(i, ko);
    akwyn(kw);
  }
  (naj.il, naj.sum, naj.med);
  cout << naj.il << endl;
  long long pom = n - naj.il / 2 - 1;
  while (t[pom] != naj.med) pom--;
  for (long long i = 0; i < naj.il / 2 + 1; i++) {
    cout << t[pom - i] << " ";
  }
  for (long long i = 0; i < naj.il / 2; i++) {
    cout << t[n - i - 1] << " ";
  }
  cout << "\n";
}
