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 Template implements Runnable {

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

    void init() throws FileNotFoundException {
        try {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        } catch (Exception e) {
            String filename = "";
            if (filename.isEmpty()) {
                in = new BufferedReader(new InputStreamReader(System.in));
                out = new PrintWriter(System.out);
            } else {
                in = new BufferedReader(new FileReader(filename + ".in"));
                out = new PrintWriter(filename + ".out");
            }
        }
    }

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

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

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

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

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


    <T> List<T>[] createGraphList(int size) {
        List<T>[] list = new List[size];
        for (int i = 0; i < size; i++) {
            list[i] = new ArrayList<>();
        }
        return list;
    }

    public static void main(String[] args) {
        new Thread(null, new Template(), "", 1l * 200 * 1024 * 1024).start();
    }

    long timeBegin, timeEnd;

    void time() {
        timeEnd = System.currentTimeMillis();
        System.err.println("Time = " + (timeEnd - timeBegin));
    }

    long memoryTotal, memoryFree;

    void memory() {
        memoryFree = Runtime.getRuntime().freeMemory();
        System.err.println("Memory = " + ((memoryTotal - memoryFree) >> 10)
                + " KB");
    }

    public void run() {
        try {
            timeBegin = System.currentTimeMillis();
            memoryTotal = Runtime.getRuntime().freeMemory();
            init();
            solve();
            out.close();
            if (System.getProperty("ONLINE_JUDGE") == null) {
                time();
                memory();
            }
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
    }

    long[] prefix;

    long get(int l, int r) {
        if (l == 0) return prefix[r];
        return prefix[r] - prefix[l - 1];
    }

    class Fraction implements Comparable<Fraction> {
        long x;
        long y;

        public Fraction(long x, long y) {
            this.x = x;
            this.y = y;
        }

        Fraction sub(long b) {
            x -= b * y;
            return this;
        }

        @Override
        public int compareTo(Fraction o) {
            long a = x * o.y;
            long b = y * o.x;
            return Long.compare(a, b);
        }
    }

    Fraction calc(int base, int cnt) {
        long sum = get(base, base);
        if (cnt != 0) {
            sum += get(base - cnt, base - 1);
            sum += get(prefix.length - cnt, prefix.length - 1);
        }
        return new Fraction(sum, 2 * cnt + 1);
    }

    void solve() throws IOException {
        int n = readInt();
        int[] x = readIntArray(n);
        Arrays.sort(x);
        prefix = new long[n];
        prefix[0] = x[0];
        for (int i = 1; i < n; i++) {
            prefix[i] = prefix[i - 1] + x[i];
        }

        Fraction res = new Fraction(-100, 1);
        int base = 0;
        int cnt = 0;

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

            while (l <= r) {
                int mid = (l + r) >> 1;
                Fraction f1 = calc(i, mid);
                Fraction f2 = calc(i, mid - 1);

                if (f1.compareTo(f2) >= 0) {
                    ans = mid;
                    l = mid + 1;
                } else {
                    r = mid - 1;
                }
            }

            if (calc(i, ans).sub(x[i]).compareTo(res) > 0) {
                res = calc(i, ans).sub(x[i]);
                base = i;
                cnt = ans;
            }
        }
        out.println(2 * cnt + 1);
        out.print(x[base] + " ");
        for (int i = 0; i < cnt; i++) {
            out.print(x[base - 1 - i] + " " + x[n - 1 - i] + " ");
        }
    }


}