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.util.*;
import java.io.*;

public class Skewness {
	static int [] a = new int [200010];
	static long [] dp = new long [200010];
	static int n;
	static RealNum mean(int med, int j) {
		return new RealNum((dp[med] - dp[med - j - 1] + dp[n] - dp[n - j]), (j + j + 1));
	}
	static int search(int b, int e, int med) {
		if(b == e) {
			return b;
		}
		if(e - b == 1) {
			if(mean(med, b).compareTo (mean(med, e)) > 0) return b;
			else return e;
		}
		int m = (b + e) >> 1;
		if (mean(med, m).compareTo(mean(med, m + 1)) < 0)  return search(m + 1, e, med);
		else if ( mean(med, m).compareTo(mean(med, m + 1)) > 0) return search(b, m, med);
		else return m;
	}

	public static void main (String[] args) {
		Reader in = new Reader ();
		n = in.nextInt();
		for(int i = 1; i <= n; i++) a[i] = in.nextInt();
		Arrays.sort(a, 1, n + 1);

		for(int i = 1; i <= n; i++) {
			dp[i] = dp[i - 1] + a[i];
		}	
		RealNum ans = new RealNum (0, 1);
		int med = 0;
		int opt = 0;

		for(int i = 1; i <= n; i++) {
			int optimal = search(0, Math.min(n - i, i - 1), i);
			RealNum ave = mean(i, optimal);
			ave.num -= ave.den * a[i];

			if(ans.compareTo(ave) < 0) {
				ans = ave;
				med = i;
				opt = optimal;
			}
		}
		if(med == 0) {
			med = 1;
			opt = 0;
		}
		System.out.println(1 + opt + opt);
		for(int i = (med - opt); i <= med; i++) System.out.printf("%d ", a[i]);
		for(int i = (n - opt + 1); i <= n; i++) System.out.printf ("%d ", a[i]);
		System.out.println();
	}
	static class Reader {
		private BufferedReader a;
		private StringTokenizer b;
		Reader() {
			a = new BufferedReader (new InputStreamReader (System.in));
		} 
		public String next () {
			while(b == null || !b.hasMoreTokens()) {
				try {
					 b = new StringTokenizer (a.readLine());
				 } catch (IOException e) {
					 e.printStackTrace();
				 }
			 }
			 return b.nextToken();
		}
		public int nextInt () {
		     return Integer.parseInt(next());
		}
		public long nextLong () {
			return Long.parseLong(next());
		}
		public double nextDouble () {
			return Double.parseDouble(next());
		}
		public String nextLine () {
		 	try {
		 		return a.readLine();
		 	} catch (IOException e) {
		 		e.printStackTrace ();
		 	}
		 	return "##";
		}
	}
	static class Pair <P, Q> {
		P first;
		Q second;
		Pair () {}
		Pair (P first, Q second) {
			this.first = first;
			this.second = second;
		}
	}
	static class RealNum implements Comparable <RealNum> {
		long num, den;
		RealNum (long num, long den) {
			this.num = num;
			this.den = den;
		}
		public int compareTo(RealNum x) {
			long p = num * x.den;
			long q = x.num * den;
			if(p == q) return 0;
			else if (p > q) return 1;
			else return -1;
		}
	}
}