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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.io.IOException;
import java.util.InputMismatchException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskE solver = new TaskE();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskE {
        List<Integer> result;

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            Integer[] a = new Integer[n];
            for (int i = 0; i < n; ++i) {
                a[i] = in.nextInt();
            }
            Arrays.sort(a);

            double res = solve(a, Double.MAX_VALUE);
            solve(a, res);

            out.println(result.size());
            for (int i = 0; i < result.size(); ++i) {
                if (i > 0) {
                    out.print(" ");
                }
                out.print(result.get(i));
            }
            out.println();
        }

        double solve(Integer[] a, double best) {
            double res = 0;
            long[] s = new long[a.length];
            for (int i = 0; i < a.length; ++i) {
                s[i] = a[i];
                if (i > 0) {
                    s[i] += s[i - 1];
                }
            }
            for (int i = 0; i < a.length; ++i) {
                int n = findBestN(a, s, i, Math.min(i, a.length - 1 - i), 0);
                double cand = checkCandidate(a, s, i - n, i - 1, i, i, a.length - n, a.length - 1, best);
                if (res < cand) {
                    res = cand;
                }
                if (res == best) {
                    return res;
                }

                if (i + 1 < a.length) {
                    n = findBestN(a, s, i, Math.min(i, a.length - 2 - i), 1);
                    cand = checkCandidate(a, s, i - n, i - 1, i, i + 1, a.length - n, a.length - 1, best);
                    if (res < cand) {
                        res = cand;
                    }
                    if (res == best) {
                        return res;
                    }
                }
            }
            return res;
        }

        int findBestN(Integer[] a, long[] s, int i, int maxN, int even) {
            int lo = 0;
            int hi = maxN - 1;
            while (lo <= hi) {
                int mid = (lo + hi) / 2;
                long x = a[i - mid - 1] + a[a.length - mid - 1];
                long num = sum(s, i - mid, i - 1) + sum(s, i, i + even) + sum(s, a.length - mid, a.length - 1);
                if (2 * num <= x * (2 * mid + 1 + even)) {
                    lo = mid + 1;
                } else {
                    hi = mid - 1;
                }
            }
            return lo;
        }

        long sum(long[] s, int x, int y) {
            long r = 0;
            if (y >= 0) {
                r += s[y];
            }
            if (x - 1 >= 0) {
                r -= s[x - 1];
            }
            return r;
        }

        double checkCandidate(Integer[] a, long[] sum, int leftFirst, int leftLast, int midFirst, int midLast, int rightFirst, int rightLast, double best) {
            long res = sum[rightLast] - sum[rightFirst - 1];
            if (leftLast >= 0) {
                res += sum[leftLast];
            }
            if (leftFirst - 1 >= 0) {
                res -= sum[leftFirst - 1];
            }

            int n = leftLast - leftFirst + 1;
            res -= (long) n * (a[midFirst] + a[midLast]);

            double cand = res / (2.0 * n + midLast - midFirst + 1);

            if (cand == best) {
                result = new ArrayList<>();
                for (int i = leftFirst; i <= leftLast; ++i) {
                    result.add(a[i]);
                }
                for (int i = midFirst; i <= midLast; ++i) {
                    result.add(a[i]);
                }
                for (int i = rightFirst; i <= rightLast; ++i) {
                    result.add(a[i]);
                }
            }

            return cand;
        }

    }

    static class InputReader {
        BufferedReader bufReader;
        StringTokenizer stringTokenizer;
        boolean isEof = false;

        public InputReader(InputStream stream) {
            bufReader = new BufferedReader(new InputStreamReader(stream));
        }

        public String next() {
            while (stringTokenizer == null || !stringTokenizer.hasMoreTokens()) {
                try {
                    String line = bufReader.readLine();
                    if (line == null) {
                        isEof = true;
                        return null;
                    }
                    stringTokenizer = new StringTokenizer(line);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            }
            return stringTokenizer.nextToken();
        }

        public int nextInt() {
            String s = next();
            if (s == null) {
                return 0;
            }
            return Integer.parseInt(s);
        }

    }
}