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 JAVA):

Solution:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class HR1 {

    BufferedReader br;
    PrintWriter out;
    StringTokenizer st;
    boolean eof;
    long mod = 1000000;
    class Fraction implements Comparable<Fraction> {
        long upper;
        long lower;
        public Fraction(long upper, long lower) {
            this.upper = upper;
            this.lower = lower;
        }

        @Override
        public int compareTo(Fraction o) {
            long val =  this.upper * o.lower - this.lower * o.upper;
            if(val > 0) {
                return 1;
            }
            else if(val < 0) {
                return -1;
            }
            else {
                return 0;
            }
        }
        public String toString() {
            return upper + " " + lower;
        }
    }
    void solve() throws IOException {
        int n = nextInt();
        long[] arr = nextLongArr(n);

        shuffle(arr);
        Arrays.sort(arr);
        if(n <= 2) {
            outln(n);
            for(int i = 0; i < n; i++) {
                out(arr[i] + " ");
            }
            return;
        }

        long[] pref = new long[1 + n];
        for(int i = 1; i < n + 1; i++) {
            pref[i] = pref[i - 1] + arr[i - 1];
        }
        int bestIdx = -1;
        int bestLen = -1;
        Fraction max = new Fraction(-1, 1);

        for(int i = 1; i < n - 1; i++) {
            int l = 0;
            int h = Math.min(i, n - i - 1);

            while(l < h - 3) {
                int f1 = (2 * l + h) / 3;
                int f2 = (l + 2 * h) / 3;
                Fraction frac1 = getFrac(pref, i, f1);
                Fraction frac2 = getFrac(pref, i, f2);
                int comp = frac1.compareTo(frac2);
                if(comp > 0) {
                    h = f2;
                }
                else {
                    l = f1;
                }
            }
            for(int j = l; j <= h; j++) {
                Fraction frac = getFrac(pref, i, j);
                int comp = max.compareTo(frac);
                if(comp < 0) {
                    max = frac;
                    bestIdx = i;
                    bestLen = j;
                }
            }
        }
        outln(2 * bestLen + 1);
        for(int i = bestIdx - bestLen; i <= bestIdx; i++) {
            out(arr[i] + " ");
        }
        for(int i = n - bestLen; i < n; i++) {
            out(arr[i] + " ");
        }
    }
    public Fraction getFrac(long[] preSum, int midIdx, int len) {
        int n = preSum.length - 1;
        long midValue = preSum[midIdx + 1] - preSum[midIdx];
        long upper = 0;
        upper += preSum[n] - preSum[n - len];
        upper += preSum[midIdx + 1] - preSum[midIdx - len];
        long lower = 2 * len + 1;
        return new Fraction(upper - lower * midValue, lower);
    }

    void shuffle(long[] a) {
        int n = a.length;
        for(int i = 0; i < n; i++) {
            int r = i + (int) (Math.random() * (n - i));
            long tmp = a[i];
            a[i] = a[r];
            a[r] = tmp;
        }
    }


    private void outln(Object o) {
        System.out.println(o);
    }
    private void out(Object o) {
        System.out.print(o);
    }
    public HR1() throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        solve();
        out.close();
    }
    public static void main(String[] args) throws IOException {
        new HR1();
    }

    public long[] nextLongArr(int n) throws IOException{
        long[] res = new long[n];
        for(int i = 0; i < n; i++)
            res[i] = nextLong();
        return res;
    }
    public int[] nextIntArr(int n) throws IOException {
        int[] res = new int[n];
        for(int i = 0; i < n; i++)
            res[i] = nextInt();
        return res;
    }
    public String nextToken() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                eof = true;
                return null;
            }
        }
        return st.nextToken();
    }
    public String nextString() {
        try {
            return br.readLine();
        } catch (IOException e) {
            eof = true;
            return null;
        }
    }
    public int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }
    public long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }
    public double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }
}