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;
const int NMAX = 200025;
struct frac {
  long long int a, b;
  frac(long long int _a = 0, long long int _b = 1) : a(_a), b(_b) {}
};
bool operator<(const frac &x, const frac &y) { return x.a * y.b < y.a * x.b; }
int n;
int v[NMAX];
long long int s_part[NMAX];
long long int sum(int st, int dr) { return s_part[dr] - s_part[st - 1]; }
frac get_val(int where, int sz) {
  return frac(
      sum(where - sz, where) + sum(n - sz + 1, n) - (2ll * sz + 1) * v[where],
      2ll * sz + 1);
}
vector<int> get_ans(int where, int sz) {
  vector<int> ans;
  for (int i = where - sz; i <= where; ++i) ans.push_back(v[i]);
  for (int i = n - sz + 1; i <= n; ++i) ans.push_back(v[i]);
  return ans;
}
int main() {
  ios_base ::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> v[i];
  sort(v + 1, v + n + 1);
  for (int i = 1; i <= n; ++i) s_part[i] = v[i] + s_part[i - 1];
  frac best;
  int where = 1, sz = 0;
  frac val1, val2;
  for (int i = 1; i <= n; ++i) {
    int st = 0, dr = min(i - 1, n - i) - 1;
    int mid1, mid2, ans = -1;
    int mid;
    while (st <= dr) {
      mid = (st + dr) >> 1;
      val1 = get_val(i, mid);
      val2 = get_val(i, mid + 1);
      if (val1 < val2) {
        st = mid + 1;
        ans = mid;
      } else
        dr = mid - 1;
    }
    ++ans;
    frac aux = get_val(i, ans);
    if (best < aux) {
      best = aux;
      where = i;
      sz = ans;
    }
  }
  vector<int> ans = get_ans(where, sz);
  sort(ans.begin(), ans.end());
  cout << ans.size() << '\n';
  for (int i = 0; i < ans.size(); ++i)
    cout << ans[i] << " \n"[i + 1 == ans.size()];
  return 0;
}