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

public class E {

	private static Scanner in = new Scanner(System.in);
	private static PrintStream out = System.out;
	
	public static void main(String[] args) {
		int n = in.nextInt();
		long[] x = new long[n];
		for (int i = 0; i < n; ++i)
			x[i] = in.nextLong();
		Arrays.sort(x);
		long[] sums = new long[n + 1];
		for (int i = 1; i <= n; ++i)
			sums[i] = sums[i - 1] + x[i - 1];
		boolean seen = false;
		BigInteger skewnessA = BigInteger.ZERO;
		BigInteger skewnessB = BigInteger.ONE;
		BigInteger skewnessC = BigInteger.ZERO;
		int ansI = -1;
		int ansJ = -1;
		for (int i = 1; i + 1 < n; ++i) {
			int l = 1;
			int h = Math.min(i, n - i - 1) + 1;
			while (l + 1 < h) {
				int m = (l + h)/2;
				// with = [i - m ... i] + [n - m ... n)
				long with = (sums[i + 1] - sums[i - m]) + (sums[n] - sums[n - m]);
				//BigDecimal withSkewness = new BigDecimal(with, MC).divide(new BigDecimal(2*m + 1.0), MC); 
				// without = [i - m + 1 ... i] + [n - m + 1 ... n) 
				long without = (sums[i + 1] - sums[i - m + 1]) + (sums[n] - sums[n - m + 1]);
				//BigDecimal withoutSkewness = new BigDecimal(without, MC).divide(new BigDecimal(2*(m - 1) + 1.0), MC);
				// want to know:  without*(2*m + 1.0) <= with*(2*(m - 1) + 1.0) 
				if ((without - with)*(2*m + 1.0) + 2*with <= 0)
					l = m;
				else
					h = m;
			}
			long candSum = (sums[i + 1] - sums[i - l]) + (sums[n] - sums[n - l]);
			//BigDecimal candSkewness = new BigDecimal(candSum, MC).divide(new BigDecimal(2*l + 1.0), MC).subtract(new BigDecimal(x[i]));
			BigInteger candSkewnessA = new BigInteger("" + candSum);
			BigInteger candSkewnessB = new BigInteger("" + (2*l + 1));
			BigInteger candSkewnessC = new BigInteger("" + x[i]);
			BigInteger term1 = skewnessA.multiply(candSkewnessB);
			BigInteger term2 = skewnessB.multiply(candSkewnessB).multiply(skewnessC.subtract(candSkewnessC));
			BigInteger term3 = skewnessB.multiply(candSkewnessA);
			//if (skewnessA/skewnessB - (skewnessC - x[i]) - candSum/(2*l + 1.0) < 0)
			//if (skewnessA*(2*l + 1.0) - skewnessB*(2*l + 1.0)*(skewnessC + x[i]) - skewnessB*candSum < 0)
			//if (skewnessA*(2*l + 1.0) - skewnessB*(2*l + 1.0)*(skewnessC + x[i]) - skewnessB*candSum < 0)
			if (term1.subtract(term2).subtract(term3).compareTo(BigInteger.ZERO) < 0) {
				skewnessA = candSkewnessA;
				skewnessB = candSkewnessB;
				skewnessC = candSkewnessC;
				ansI = i;
				ansJ = l;
				seen = true;
			}
		}
		if (seen) {
			out.println(2*ansJ + 1);
			for (int i = 0; i < ansJ; ++i) {
				out.print(x[ansI - i - 1] + " ");
				out.print(x[n - i - 1] + " ");
			}
			out.println(x[ansI]);
		} else {
			out.println(1);
			out.println(x[0]);
		}
	}
	
}