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 SimpleSkewness
{
	public static void main(String[] args) throws Exception
	{
		FastScanner in = new FastScanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		
		int n = in.nextInt();
		
		long[] array = new long[n];
		for(int x = 0; x < n; x++)
		{
			array[x] = in.nextInt();
		}
		
		Random rand = new Random();
		for(int y = 0; y < array.length; y++)
		{
			int index = rand.nextInt(array.length - y) + y;
			long temp = array[y];
			array[y] = array[index];
			array[index] = temp;
		}
		
		Arrays.sort(array);
		
		long[] sum = new long[n + 1];
		for(int i = 0; i < array.length; i++)
		{
			sum[i + 1] = sum[i] + array[i];
		}
		
		Fraction best = new Fraction(0, 1);
		int median = 0;
		int size = 0;
		
		for(int z = 1; z < array.length; z++)
		{
			int low = 1;
			int high = z;
			while(low < high)
			{
				int mid = (low + high + 1) / 2;
				
				Fraction average = new Fraction(sum[z + 1] - sum[z - mid + 1] + sum[n] - sum[n - mid + 1], 2 * mid - 1);
				Fraction next = new Fraction(array[n - mid] + array[z - mid], 2);
				
				if(next.compareTo(average) <= 0)
				{
					high = mid - 1;
				}
				else
				{
					low = mid;
				}
			}
			
			Fraction average = new Fraction(sum[z + 1] - sum[z - low] + sum[n] - sum[n - low], 2 * low + 1);
			Fraction current = average.subtract(new Fraction(array[z], 1));
			
			if(current.compareTo(best) > 0)
			{
				best = current;
				median = z;
				size = low;
			}
		}
		
		out.println(2 * size + 1);
		for(int a = median; a >= median - size; a--)
		{
			out.print(array[a] + " ");
		}
		
		for(int b = n - 1; b >= n - size; b--)
		{
			if(b < n - 1)
			{
				out.print(" ");
			}
			
			out.print(array[b]);
		}
		
		out.println();
		out.close();
	}
	
	public static long gcd(long a, long b)
	{
		if(b == 0)
		{
			return a;
		}
		else
		{
			return gcd(b, a % b);
		}
	}
	
	public static long lcm(long a, long b)
	{
		return a * (b / gcd(a, b));
	}
	
	static class Fraction
	{
		long num;
		long denom;
		
		public Fraction(long n, long d)
		{
			num = n;
			denom = d;
			
			if(denom < 0)
			{
				num *= -1;
				denom *= -1;
			}
			
			reduce();
		}
		
		public void reduce()
		{
			long g = gcd(Math.abs(num), denom);
			num /= g;
			denom /= g;
		}
		
		public Fraction subtract(Fraction f)
		{
			long l = lcm(denom, f.denom);
			return new Fraction(num * (l / denom) - f.num * (l / f.denom), l);
		}
		
		public int compareTo(Fraction o)
		{
			return Long.compare(num * o.denom, o.num * denom);
		}
	}
	
	static class FastScanner
	{
		BufferedReader br;
		StringTokenizer st;
		
		public FastScanner(InputStream input)
		{
			br = new BufferedReader(new InputStreamReader(input));
			st = new StringTokenizer("");
		}
		
		public String next() throws IOException
		{
			if(st.hasMoreTokens())
			{
				return st.nextToken();
			}
			else
			{
				st = new StringTokenizer(br.readLine());
				return next();
			}
		}
		
		public int nextInt() throws IOException
		{
			return Integer.parseInt(next());
		}
	}
}