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.math.BigInteger;
import java.util.Arrays;
import java.util.StringTokenizer;

public class E {

    final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

	void solve() throws IOException {
        int t = 1;
        while (t-- > 0) {
            solveTest();
        }
	}

    long[] prSum;
    int[] a;
    int n;
    void solveTest() throws IOException {
        n = readInt();
        Integer[] tmp = new Integer[n];

        for(int i = 0; i < n; i++) {
            tmp[i] = readInt();
        }

        Arrays.sort(tmp);

        a = new int[n];
        for(int i = 0; i < n; i++) {
            a[i] = tmp[i];
        }

        prSum = new long[n];

        prSum[0] = a[0];
        for(int i = 1; i < n ;i++) {
            prSum[i] = a[i] + prSum[i-1];
        }

        long up = 0;
        long down = 1;
        int index = -1;
        int resC = 0;

        for(int i = 1; i < n-1; i++) {
            long median = a[i];

            int count = binarySearch(i);
            long sum = getQuery(i-count, i-1) + getQuery(n-count, n-1) + median;
            long z = count * 2 + 1;
            long curUp = sum - median * z;
            long curDown = z;
            if(BigInteger.valueOf(curUp).multiply(BigInteger.valueOf(down)).compareTo(BigInteger.valueOf(up).multiply(BigInteger.valueOf(curDown))) >= 0) {
                up = curUp;
                down = curDown;
                index = i;
                resC = count;
            }
        }
        if(up == 0) {
            out.println(1);
            out.println(a[0]);
            return;
        }

        out.println(resC * 2 + 1);
        for(int i = index-resC; i <= index; i++) {
            out.print(a[i] + " ");
        }
        for(int i = n - resC; i < n; i++) {
            out.print(a[i] + " ");
        }

    }

    int binarySearch(int mi) {
        int l = 1;
        int r = Math.min(mi, n - mi - 1);

        int ans = 0;
        while(l <= r) {
            int m = (l+r) / 2;
            long prevSum = getQuery(mi - m + 1, mi) + getQuery(n-m+1, n-1);
            int prevCount = (m-1) * 2 + 1;
            long left = (a[mi-m] + a[n-m]) * 1l * prevCount;
            long right = 2 * prevSum;
            if(left < right) {
                r = m - 1;
            } else {
                ans = m;
                l = m+1;
            }
        }
        return ans;
    }


    long get(int x) {
        if(x < 0) return 0;
        return prSum[x];
    }

    long getQuery(int from, int to) {
        if(to < from) return 0;
        return get(to) - get(from-1);
    }

    void init() throws FileNotFoundException {
        if (ONLINE_JUDGE) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        }
    }

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    int[] readArr(int n) throws IOException {
        int[] res = new int[n];
        for (int i = 0; i < n; i++) {
            res[i] = readInt();
        }
        return res;
    }

    long[] readArrL(int n) throws IOException {
        long[] res = new long[n];
        for (int i = 0; i < n; i++) {
            res[i] = readLong();
        }
        return res;
    }

    public static void main(String[] args) {
        new E().run();
    }

    public void run() {
        try {
            long t1 = System.currentTimeMillis();
            init();
            solve();
            out.close();
            long t2 = System.currentTimeMillis();
            System.err.println("Time = " + (t2 - t1));
        } catch (Exception e) {
            e.printStackTrace(System.err);
            System.exit(-1);
        }
    }
}