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.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class SimpleSkewness
{
	static int[] arr;
	static long[] cum;
	static int n;
	public static void main(String[] args) throws IOException
	{
		Scanner sc = new Scanner(System.in);
		PrintWriter pw = new PrintWriter(System.out);
		
		n = sc.nextInt();
		arr = new int[n];
		for (int i = 0; i < n; i++)
			arr[i] = sc.nextInt();
		Arrays.sort(arr);
		
		cum = new long[n];
		cum[0] = arr[0];
		for (int i = 1; i < n; i++)
			cum[i] = cum[i-1] + arr[i];
		
		int median = -1;
		boolean dobl = false;
//		double max = -1;
		fraction max = new fraction(-1, 1);
		int num = 0;
		
		// some code
		for (int i = 0; i < n; i++)
		{
			// median is arr[i]
			int best = bs(i, 0, Math.min(i, n-1-i), 0); 
			for (int j = 0; j < 3; j++)
			{
				fraction med = new fraction(arr[i], 1);
				if(best + j > Math.min(i, n-1-i))
					break;
				fraction mean = calc(i, best+j, 0);
//				if(mean - med > max)
				fraction f = mean.sub(med);
				if(f.compare(max) > 0)
				{
					max = f;
					dobl = false;
					median = i;
					num = best+j;
				}
			}
			
			if(i < n-1)
			{
				best = bs(i, 0, Math.min(i, n-2-i), 1); 
				fraction med = new fraction((arr[i] + arr[i+1]),2);
				for (int j = 0; j < 3; j++)
				{
					if(best + j > Math.min(i, n-2-i))
						break;
					fraction mean = calc(i, best+j, 1);
					fraction f = mean.sub(med);
					if(f.compare(max) > 0)
					{
						max = f;
						dobl = true;
						median = i;
						num = best+j;
					}
				}
			}
		}
		
		int size = 2*num;
		if(dobl)
			size += 2;
		else
			size += 1;
		
		pw.println(size);
		if(dobl)
			pw.print(arr[median] + " " + arr[median+1]);
		else
			pw.print(arr[median]);
		
		for (int i = median-1; i >= median - num; i--)
			pw.print(" " + arr[i]);
			
		for (int i = n-1; i >= n - num; i--)
			pw.print(" " + arr[i]);
			
		pw.println();
		pw.flush();
		pw.close();
	}
	
	private static fraction calc(int med, int num, int dobl)
	{
		int totalCnt = 1;
		long total = arr[med];
		if(dobl == 1)
		{
			total += arr[med+1];
			totalCnt++;
		}
		
		totalCnt += 2*num;
		total += get(n-num, n-1);
		total += get(med-num, med-1);
		return new fraction(total, totalCnt);
	}

	static double eps = 1e-9;
//	private static int s(int med, int st, int en, int dobl)
//	{
//		while(en-st+1 > 3)
//		{
//			int f = st + (en-st)/3;
//			int s = st + 2*(en-st)/3;
//			
//			fraction f1 = calc(med, f, dobl);
//			fraction s1 = calc(med, s, dobl);
//			
//			if(f1.compare(s1) < 0)
//				st = f;
//			else
//				en = s;
//		}
//		return st;
//	}
	
	private static int bs(int med, int st, int en, int dobl)
	{
		while(st < en)
		{
			int mid = (st+en)>>1;
			
			if(calc(med, mid, dobl).compare(calc(med, mid+1, dobl)) < 0)
				st = mid+1;
			else
				en = mid;
		}
		return st;
	}

	static long get(int st, int en)
	{
		if(st > en)
			return 0;
		long ans = cum[en];
		if(st > 0)
			ans -= cum[st-1];
		return ans;
	}
	
	static class fraction
	{
		long a, b;
		public fraction(long a, long b)
		{
			this.a = a;
			this.b = b;
			if(this.b < 0)
			{
				this.b*=-1;
				this.a*=-1;
			}
		}
		
		public fraction sub(fraction f)
		{
			return new fraction(a*f.b - b*f.a, b*f.b);
		}
		
		long gcd(long a, long b)
		{
			if(b == 0)
				return a;
			return gcd(b, a%b);
		}
		
		int compare(fraction f)
		{
			long f1 = f.b*a;
			long f2 = b*f.a;
			if(f1 == f2)
				return 0;
			return (f1 < f2)?-1:1;
		}
	}
	static class Scanner
	{
		StringTokenizer st; BufferedReader br;
		public Scanner(InputStream s){br = new BufferedReader(new InputStreamReader(s));}
		public String next() throws IOException{while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine()); return st.nextToken();}
		public int nextInt() throws IOException{return Integer.parseInt(next());}
		public long nextLong() throws IOException{return Long.parseLong(next());}
		public String nextLine() throws IOException{return br.readLine();}
		public double nextDouble() throws IOException{return Double.parseDouble(next());}
		public boolean ready() throws IOException{return br.ready();}
	}
}