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 static java.lang.Double.parseDouble;
import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.Math.min;
import static java.lang.System.exit;
import static java.util.Arrays.sort;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class E {
	
	static BufferedReader in;
	static PrintWriter out;
	static StringTokenizer tok;
	
	static void solve() throws Exception {
		int n = nextInt();
		int a[] = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = nextInt();
		}
		sort(a);
//		System.err.println(Arrays.toString(a));
		long sums[] = new long[n + 1];
		for (int i = 0; i < n; i++) {
			sums[i + 1] = sums[i] + a[i];
		}
		long bestNum = 0, bestDen = 1;
		int bestMid = 0, bestCount = 0;
		for (int mid = 0; mid <= 2 * n - 2; mid++) {
			long medianNum, medianDen;
			int bottom = mid / 2, top = (mid + 1) / 2;
			if (mid % 2 == 0) {
				medianNum = a[bottom];
				medianDen = 1;
			} else {
				medianNum = a[bottom] + a[top];
				medianDen = 2;
			}
//			System.err.println("Point " + mid);
			int l = 0;
			int r = min(bottom, n - top - 1);
			while (l < r) {
				int m = (l + r) >>> 1;
				long averageNum = medianNum + sums[bottom] - sums[bottom - m] + sums[n] - sums[n - m];
				long averageDen = medianDen + 2 * m;
				long nextNum = a[bottom - m - 1] + a[n - m - 1];
				long nextDen = 2;
//				System.err.println("Count " + m +
//					": average " + averageNum + "/" + averageDen +
//					", next " + nextNum + "/" + nextDen);
				if (nextNum * averageDen < averageNum * nextDen) {
					r = m;
				} else {
					l = m + 1;
				}
			}
			int m = l;
			long averageNum = medianNum + sums[bottom] - sums[bottom - m] + sums[n] - sums[n - m];
			long averageDen = medianDen + 2 * m;
			long diffNum = averageNum * medianDen - medianNum * averageDen;
			long diffDen = averageDen * medianDen;
//			System.err.println("At point " + mid +
//				": median " + medianNum + "/" + medianDen +
//				", count " + m +
//				", average: " + averageNum + "/" + averageDen +
//				", difference: " + diffNum + "/" + diffDen);
			if (bestNum * diffDen < diffNum * bestDen) {
				bestNum = diffNum;
				bestDen = diffDen;
				bestMid = mid;
				bestCount = m;
			}
		}
		out.println(2 * bestCount + bestMid % 2 + 1);
		for (int i = 0; i <= bestCount + bestMid % 2; i++) {
			out.print(a[bestMid / 2 - bestCount + i] + " ");
		}
		for (int i = 0; i < bestCount; i++) {
			out.print(a[n - bestCount + i] + " ");
		}
	}
	
	static int nextInt() throws IOException {
		return parseInt(next());
	}

	static long nextLong() throws IOException {
		return parseLong(next());
	}

	static double nextDouble() throws IOException {
		return parseDouble(next());
	}

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

	public static void main(String[] args) {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(new OutputStreamWriter(System.out));
			solve();
			in.close();
			out.close();
		} catch (Throwable e) {
			e.printStackTrace();
			exit(1);
		}
	}
}