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;
const int M = 200005;
long long read() {
  long long x = 0, f = 1;
  char c;
  while ((c = getchar()) < '0' || c > '9') {
    if (c == '-') f = -1;
  }
  while (c >= '0' && c <= '9') {
    x = (x << 3) + (x << 1) + (c ^ 48);
    c = getchar();
  }
  return x * f;
}
long long n, t1, t2, zxy, sy, a[M], s[M];
struct node {
  long long x, y;
  bool operator<(const node &b) const { return x * b.y < b.x * y; }
  bool operator==(const node &b) const { return x * b.y == b.x * y; }
} res, ans;
node cal(long long x) {
  node t = node{s[t1] - s[t1 - x - 1] + s[n] - s[n - x], 2 * x + 1};
  if (res < t) {
    res = t;
    t2 = x;
  }
  return t;
}
void dich(long long l, long long r) {
  if (l > r) return;
  long long m1 = l + (r - l) / 3, m2 = r - (r - l) / 3;
  node t1 = cal(m1), t2 = cal(m2);
  if (t1 == t2)
    dich(l, m1 - 1);
  else if (t2 < t1)
    dich(l, m2 - 1);
  else
    dich(m1 + 1, r);
}
signed main() {
  n = read();
  for (long long i = 1; i <= n; i++) a[i] = read();
  sort(a + 1, a + 1 + n);
  for (long long i = 1; i <= n; i++) s[i] = s[i - 1] + a[i];
  ans = node{-1, 1};
  for (long long i = 1; i <= n; i++) {
    t1 = i;
    t2 = 0;
    res = node{a[i], 1};
    dich(1, min(i - 1, n - i));
    res.x -= a[i] * res.y;
    if (ans < res) {
      ans = res;
      zxy = t1;
      sy = t2;
    }
  }
  printf("%lld\n", 2 * sy + 1);
  for (long long i = zxy - sy; i <= zxy; i++) printf("%lld ", a[i]);
  for (long long i = n - sy + 1; i <= n; i++) printf("%lld ", a[i]);
  puts("");
}
