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.*;
import java.util.*;

public class P626E
{
    public static StringTokenizer st;
    public static void nextLine(BufferedReader br) throws IOException
    {
        st = new StringTokenizer(br.readLine());
    }
    
    public static String next()
    {
        return st.nextToken();
    }
    
    public static int nextInt()
    {
        return Integer.parseInt(st.nextToken());
    }
    
    public static long nextLong()
    {
        return Long.parseLong(st.nextToken());
    }
    
    public static double nextDouble()
    {
        return Double.parseDouble(st.nextToken());
    }
    static int n;
    static long[] val, csum;
    public static void main(String[] args) throws IOException
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        nextLine(br);
        n = nextInt();
        val = new long[n];
        nextLine(br);
        for (int i = 0; i < n; i++)
        {
            val[i] = nextLong();
        }
        Arrays.sort(val);
        csum = new long[n+1];
        csum[0] = 0;
        for (int i = 0; i < n; i++)
        {
            csum[i + 1] = csum[i] + val[i];
        }
       
        int besti = 0, bestk = 0;
        Fraction best = new Fraction(0, 1);
        
        for (int i = 0; i < n; i++)
        {
            int k = tsearch(i);
            Fraction ans = calc(i, k);
            ans.num -= ans.denom * val[i];
            
            //System.out.println("tsearch on " + i + " is " + k + " and ans is " + 
            //        ans.num + "/" + ans.denom);
            if (ans.compareTo(best) > 0)
            {
                best = ans;
                besti = i;
                bestk = k;
            }
        }
        System.out.println(String.valueOf(2 * bestk + 1));
        StringBuffer sb = new StringBuffer();
        sb.append(val[besti] + " ");
        for (int i = 0; i < bestk; i++)
        {
            sb.append(val[besti - i - 1] + " ");
            sb.append(val[n - i - 1] + " ");
        }
        System.out.println(sb.toString());
    }
    
    static int tsearch(int pos)
    {
        int l = 0;
        int r = Math.min(pos, n-pos-1);
        while (l < r)
        {
            int m = (l + r) / 2;
            Fraction f1 = calc(pos, m);
            if (m > 0)
            {
                Fraction f2 = calc(pos, m-1);
                if (f2.compareTo(f1) > 0)
                {
                    r = m - 1;
                    continue;
                }
            }
            if (m < r)
            {
                Fraction f3 = calc(pos, m+1);
                if (f3.compareTo(f1) > 0)
                {
                    l = m + 1;
                    continue;
                }
            }
            return m;
        }
        return l;
    }
    
    static Fraction calc(int i, int k)
    {
        Fraction val = new Fraction((csum[i+1] - csum[i-k]) +
                (csum[n] - csum[n-k]), (2 * k + 1));
        return val;
    }
    
    
    static class Fraction implements Comparable<Fraction>
    {
        long num, denom;
        public Fraction(long n, long d)
        {
            num = n;
            denom = d;
        }
        @Override
        public int compareTo(Fraction f)
        {
            return Long.valueOf(num * f.denom).compareTo(denom * f.num);
        }
    }
}