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;
istream* pin;
uintmax_t konstansmod = (1e9) + 7;
template <typename T>
vector<T> read(int num = -1, int szorzo = 1, istream& in = *pin) {
  vector<T> container;
  if (num == -1) in >> num;
  num *= szorzo;
  for (int i = 0; i < num; i++) {
    T q;
    in >> q;
    container.push_back(q);
  }
  return container;
}
struct printer {
  ostream* o;
  printer(ostream& a = cout) : o(&a) {}
  void pr() { *o << "\n"; }
  template <typename T>
  void pr(T uintmax_t) {
    *o << std::setprecision(9) << uintmax_t << "\n";
  }
  template <typename T>
  void pr(vector<T> uintmax_t) {
    for (T w : uintmax_t) pr(w);
    pr();
  }
  template <typename T, typename... Args>
  void pr(T value, Args... args) {
    pr(value);
    pr(args...);
  }
};
template <typename H1>
void show(std::ostream& out, const char* label, H1&& value) {
  out << label << "=";
  printer(out).pr(value);
}
template <typename H1, typename... T>
void show(std::ostream& out, const char* label, H1&& value, T&&... rest) {
  const char* pcomma = strchr(label, ',');
  out.write(label, pcomma - label) << "=";
  printer(out).pr(value);
  show(out, pcomma + 1, std::forward<T>(rest)...);
}
void print(bool b) { cout << (b ? "Yes" : "No") << "\n"; }
void solve();
int main(int argc, char** argv) {
  srand((unsigned)time(NULL));
  ifstream* argfile = NULL;
  string filename = "";
  if (argc >= 2 && filename.length() == 0) filename = argv[1];
  if (filename.length() > 0) {
    argfile = new ifstream(filename);
    if (!argfile->is_open()) {
      cerr << "file cant be opened,exiting. Filename:" << filename << "\n";
      cerr << "Error: " << strerror(errno) << "\n";
      return 1;
    }
  }
  if (argfile) std::cin.rdbuf(argfile->rdbuf());
  istream& myfile = argfile ? *argfile : cin;
  pin = &myfile;
  int num;
  solve();
  return 0;
  myfile >> num;
  for (int i = 0; i < num; i++) {
    cout << "Case #" << (i + 1) << ": ";
    solve();
  }
  return 0;
}
double calc_skew(set<uintmax_t>& sol) {}
void solve() {
  int n;
  cin >> n;
  vector<uintmax_t> g = read<uintmax_t>(n);
  sort(g.begin(), g.end());
  int bestp = 0;
  double valb = 0;
  int db = 0;
  uintmax_t sums[1000001];
  for (int i = g.size() - 1; i >= 0; i--) {
    sums[i] = g[i] + sums[i + 1];
  }
  for (int i = 1; i <= n - 2; i++) {
    uintmax_t median = g[i];
    int a = 1;
    int b = min(i, n - i);
    while (a != b) {
      uintmax_t meret = (b - a) / 3;
      uintmax_t ao = a + meret;
      uintmax_t bo = ao + meret;
      if (meret == 0) {
        bo = ao + 1;
      }
      double newsuma = 0;
      newsuma += sums[i - ao] - sums[i + 1] + sums[n - ao];
      newsuma /= (double)(ao * 2 + 1);
      double newsumb = 0;
      newsumb += sums[i - bo] - sums[i + 1] + sums[n - bo];
      newsumb /= (double)(bo * 2 + 1);
      if (newsuma > newsumb) {
        if (b == bo)
          b = ao;
        else
          b = bo;
      } else {
        if (a == ao)
          a = bo;
        else
          a = ao;
      }
    }
    double newsum = 0;
    newsum += sums[i - a] - sums[i + 1] + sums[n - a];
    newsum /= (double)(a * 2 + 1);
    newsum -= median;
    double val = newsum;
    if (val > valb) {
      valb = val;
      bestp = i;
      db = a;
    }
  }
  printf("%d \n", db * 2 + 1);
  for (int i = 0; i <= db; i++) {
    printf("%d ", g[bestp - i]);
  }
  for (int i = n - db; i < n; i++) {
    printf("%d ", g[i]);
  }
}