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>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using uint8 = unsigned char;
using uint16 = unsigned short int;
using uint32 = unsigned int;
using uint64 = unsigned long long;
using int8 = signed char;
using int16 = short int;
using int32 = int;
using int64 = long long;
using pi32 = std::pair<int32, int32>;
using pi32pi32 = std::pair<int32, pi32>;
using vi32 = std::vector<int32>;
using qi32 = std::queue<int32>;
using spi32 = std::set<pi32>;
using spi32it = spi32::iterator;
namespace oct {
const int tn4[4][2] = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}};
const int tn8[8][2] = {{1, 0},  {1, 1},   {0, 1},  {-1, 1},
                       {-1, 0}, {-1, -1}, {0, -1}, {1, -1}};
void sync();
template <typename _Tp>
_Tp &mad(_Tp &x, _Tp y);
template <typename _Tp>
_Tp &mid(_Tp &x, _Tp y);
template <typename _Tp>
bool in(_Tp x, _Tp l, _Tp r);
template <typename _Tp>
_Tp sqr(_Tp x);
inline void sync() {
  std::ios::sync_with_stdio(0);
  std::cin.tie(0), std::cout.tie(0);
}
template <typename _Tp>
inline _Tp &mad(_Tp &x, _Tp y) {
  return x = std::max(x, y);
}
template <typename _Tp>
inline _Tp &mid(_Tp &x, _Tp y) {
  return x = std::min(x, y);
}
template <typename _Tp>
inline bool in(_Tp x, _Tp l, _Tp r) {
  return l <= x && x <= r;
}
template <typename _Tp>
inline _Tp sqr(_Tp x) {
  return x * x;
}
}  // namespace oct
const int N = 200005;
int64 u(int l);
int64 s(int l, int r);
int64 sg(int m, int l);
double aver(int m, int l);
int n, l, r, ml, mr, ans, max, mal;
int a[N];
int64 sum[N];
inline int64 u(int l) { return l << 1 | 1; }
inline int64 s(int l, int r) { return sum[r] - sum[l - 1]; }
inline int64 sg(int m, int l) { return s(m - l, m) + s(n - l + 1, n); }
inline bool cmp(int x, int xl, int y, int yl) {
  return sg(x, xl) * u(yl) - a[x] * u(xl) * u(yl) <
         sg(y, yl) * u(xl) - a[y] * u(xl) * u(yl);
}
int main() {
  oct::sync();
  std::cin >> n;
  for (int i = 1; i <= n; ++i) std::cin >> a[i];
  if (n <= 2) {
    std::cout << 1 << std::endl;
    std::cout << a[1] << std::endl;
    return 0;
  }
  std::sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; ++i) sum[i] = sum[i - 1] + a[i];
  for (int m = 1; m <= n; ++m) {
    l = 0, r = std::min(m - 1, n - m);
    while (l < r - 1) {
      ml = (l + l + r) / 3;
      mr = (l + r + r) / 3;
      if (sg(m, ml) * u(mr) < sg(m, mr) * u(ml)) {
        l = ml + 1;
      } else {
        r = mr;
      }
    }
    if (l < r) l = sg(m, l) * u(r) < sg(m, r) * u(l) ? r : l;
    if (m > 1 && cmp(m, l, max, mal)) continue;
    max = m, mal = l;
  }
  std::cout << mal * 2 + 1 << std::endl;
  for (int i = mal; i; --i) std::cout << a[max - i] << ' ';
  std::cout << a[max];
  for (int i = mal - 1; ~i; --i) std::cout << ' ' << a[n - i];
  std::cout << std::endl;
  return 0;
}
