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.
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.MathContext;
import java.util.Arrays;


public class E626 {

	public static void main(String[] args) throws IOException {
		int testNr = 3;
		String[] test = {
				"2\n1 2",
				"21\n999999 999998 999996 999992 999984 999968 999936 999872 999744 999488 998976 997952 995904 991808 983616 967232 934464 868928 737856 475712 999998",
				"5\n301519 370449 319010 460799 983970",
				"5\n460447 303948 286063 992238 738282",
				"20\n999999 999998 999996 999992 999984 999968 999936 999872 999744 999488 998976 997952 995904 991808 983616 967232 934464 868928 737856 475712",
				"21\n999999 999998 999996 999992 999984 999968 999936 999872 999744 999488 998976 997952 995904 991808 983616 967232 934464 868928 737856 475712 1000000",
				"4\n1 2 3 12",
				"4\n1 1 2 2"};
		String[] expected = { "2\n1 2",
				"3\n999998 999998 999999",
				"3\n301519 319010 983970",
				"3\n286063 303948 992238",
				"1\n475712",
				"1\n475712",
				"3\n1 2 12",
				"3\n1 1 2"
		};
//		System.setIn(new ByteArrayInputStream(test[testNr].getBytes()));
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(System.out);
		String[] line = br.readLine().split(" ");
		int n = Integer.parseInt(line[0]);
		long[] sums = new long[n];
		String[] line2 = br.readLine().split(" ");
		if (n<3) {
			pw.format("%d\n", n);
			pw.write(String.join(" ", line2));

		} else {
			long[] nrs = new long[n];
			for (int i = 0; i < n; i++) {
				nrs[i] = Integer.parseInt(line2[i]);
			}
			Arrays.sort(nrs);
			for (int i = 0; i < n; i++) {
				sums[i] = i == 0 ? nrs[i] : sums[i-1] + nrs[i];
			}
			int rememberMe = 0;
			BigDecimal globalMaxSkew = BigDecimal.ZERO;
			BigInteger skewDen = BigInteger.ONE,
					skewNom = BigInteger.ZERO,
					globalSkewDen = BigInteger.ONE,
					globalSkewNom = BigInteger.ZERO;
			int globalWLen = 0;
			for (int i = 1, l = n-1; i < l; i++) {
				int ll = Math.min(Math.max(0, i - ( n-1 - i)), i-1);
				int j = findOtimalLen(nrs, sums, i, ll, i-1);
				int wlen = i-j;
				int denom = 2*wlen +1;
				int otherLL = n - wlen;
				BigDecimal skew = BigDecimal.valueOf(sums[i] - (j == 0 ? 0 : sums[j-1]) - sums[otherLL - 1] + sums[n - 1])
						.divide(BigDecimal.valueOf(denom), MathContext.DECIMAL128);
				skew = skew.subtract(BigDecimal.valueOf(nrs[i]));
				skewNom = BigInteger.valueOf(sums[i] - (j == 0 ? 0 : sums[j-1]) - sums[otherLL - 1] + sums[n - 1] - nrs[i]*denom);
				skewDen = BigInteger.valueOf(denom);
				if ((skew.subtract(globalMaxSkew).doubleValue() >= 0) ||(skewNom.multiply(globalSkewDen).subtract(globalSkewNom.multiply(skewDen)).longValue() >= 0)) {
					globalMaxSkew = skew;
					rememberMe = i;
					globalWLen = wlen;
					globalSkewDen = skewDen;
					globalSkewNom = skewNom;
				}
			}
			{
				int i = rememberMe +1;
				// test small step

				int ll = Math.min(Math.max(0, i - ( n-1 - i)), i-1);
				int j = findOtimalLen(nrs, sums, i, ll, i-1);
				int wlen = i-j;
				int denom = 2*wlen +1;
				BigDecimal skew = BigDecimal.valueOf(sums[i] - (j == 0 ? 0 : sums[j-1]) - sums[n - wlen - 1] + sums[n - 1])
						.divide(BigDecimal.valueOf(denom), MathContext.DECIMAL128);
				skew = skew.subtract(BigDecimal.valueOf(nrs[i]));
				skewNom = BigInteger.valueOf(sums[i] - (j == 0 ? 0 : sums[j-1]) - sums[n - wlen - 1] + sums[n - 1] - nrs[i]*denom);
				skewDen = BigInteger.valueOf(denom);
				if (skewNom.multiply(globalSkewDen).subtract(globalSkewNom.multiply(skewDen)).longValue() >0) {
					globalMaxSkew = skew;
					rememberMe = i;
					globalWLen = wlen;
					globalSkewDen = skewDen;
					globalSkewNom = skewNom;
				}
			}

			// done testing small step
			if (globalMaxSkew.compareTo(BigDecimal.ZERO) <= 0) {
				pw.format("1\n%d", nrs[0]) ;

			} else {
				pw.format("%d\n", globalWLen*2 +1);
				for (int i = rememberMe - globalWLen; i<= rememberMe; i++) {
					pw.format("%d ", nrs[i]);
				}
				for (int i = nrs.length - globalWLen; i<= nrs.length -1; i++) {
					pw.format("%d ", nrs[i]);
				}
			}
		}
//		pw.println("\nExpected:");
//		pw.println(expected[testNr]);
		br.close();
		pw.flush();
		pw.close();
	}

	private static int findOtimalLen(long[] nrs, long[] sums, int i, int sl, int sr) {
		if (sr == sl) {
			return sr;
		}
		int mij = (sl+sr)/2;
		int otherMij = nrs.length - (i - mij);
		int lung  = (i-mij) * 2 + 1;
		int scurt = lung - 2;
 		long cmp = nrs[mij] * scurt + nrs[otherMij] * scurt - 2*(sums[i] - sums[mij] - sums[otherMij] + sums[nrs.length-1]);
		if (cmp >= 0) {
			return findOtimalLen(nrs, sums, i, sl, mij);
		} else {
			return findOtimalLen(nrs, sums, i, mij+1, sr);
		}
	}
	
}

