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.*;

// Solution

public class Main 
{    
  public static void main (String[] argv) 
  {
	  new Main();
  } 
     
  
  boolean test = false;
  
  int n;
  Integer[] a;
  long[] csum;
  int len;
  
  public Main() {
	  FastReader in = new FastReader(new BufferedReader(new InputStreamReader(System.in)));
	  //FastReader in = new FastReader(new BufferedReader(new FileReader("Main.in")));
      
      n = in.nextInt();
      a = new Integer[n];
      for(int i = 0; i < n; ++i)a[i] = in.nextInt();
      
      if (n < 3) {
          System.out.println(n);
          for(int i = 0; i < n; i++)System.out.print(a[i] + " ");
          System.out.println();
          return;
      }
      
      csum = new long[n+1];
      Arrays.sort(a);
      for (int i = 0; i < n; ++i) csum[i+1] = csum[i] + a[i];

      
      long bestnum= -1;
      int besti = -1;
      int bestlen = 0;
      for(int i = 1; i < n - 1; ++i) {
          long cur = bsearch(i);
          int curdem = 2 * len + 1;
          long curnum = cur - 1L * curdem * a[i];
          if (bestnum < 0 || curnum * (2 * bestlen + 1) > bestnum * curdem) {
              bestnum = curnum;
              besti = i;
              bestlen = len;
          }
      }
      if (besti < 0) {
        System.out.println(1);
        System.out.println(a[0]);
      }else {
          System.out.println((bestlen*2+1));
          for(int i = 1; i <= bestlen; ++i) {
              System.out.print(a[besti - i] + " " + a[n - i] + " ");
          }
          System.out.println(a[besti]);
      }
  }
  
  private long bsearch(int p) {
      int lo = 1, hi = Math.min(p, n - p - 1);
      
      long max = 0;
      while (lo <= hi) {
          int mid = (lo + hi) / 2;
          long scur = csum[n] - csum[n-mid] + csum[p+1] - csum[p - mid];
          int lcur = 2 * mid + 1;
          
         
          long spre = csum[n] - csum[n-mid+1] + csum[p+1] - csum[p - mid+1];
          int lpre = mid * 2 - 1;
          if (scur * lpre > spre * lcur) {
              lo = mid + 1;
              max = scur;              
          }else {
              hi = mid - 1;
          }
      }
      len = hi;
      
     // System.out.println("skew of " + p + " = " + skew + ", len = " + len);
      return max;
  }
     
  private int max(int a, int b) {
      return a >  b ? a : b;
  }
  
  private int min(int a, int b) {
      return a >  b ? b : a;
  }
  
  
  static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;
 
        public FastReader(BufferedReader in)
        {            
            br = in;
        }
 
        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    String line = br.readLine();
                    if (line == null || line.length() == 0) return "";
                    st = new StringTokenizer(line);
                }
                catch (IOException  e)
                {
                    return "";
                    //e.printStackTrace();
                }
            }
            return st.nextToken();
        }
 
        int nextInt()
        {
            return Integer.parseInt(next());
        }
 
        long nextLong()
        {
            return Long.parseLong(next());
        }
 
        double nextDouble()
        {
            return Double.parseDouble(next());
        }
 
        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                return "";
                //e.printStackTrace();
            }
            return str;
        }
    }
}