Problem: There are n distinct points on a coordinate line, the coordinate of i-th point equals to x_i. Choose a subset of the given set of points such that the distance between each pair of points in a subset is an integral power of two. It is necessary to consider each pair of points, not only adjacent. Note that any subset containing one element satisfies the condition above. Among all these subsets, choose a subset with maximum possible size.

In other words, you have to choose the maximum possible number of points x_{i_1}, x_{i_2}, ..., x_{i_m} such that for each pair x_{i_j}, x_{i_k} it is true that |x_{i_j} - x_{i_k}| = 2^d where d is some non-negative integer number (not necessarily the same for each pair of points).

Input

The first line contains one integer n (1 ≤ n ≤ 2 ⋅ 10^5) — the number of points.

The second line contains n pairwise distinct integers x_1, x_2, ..., x_n (-10^9 ≤ x_i ≤ 10^9) — the coordinates of points.

Output

In the first line print m — the maximum possible number of points in a subset that satisfies the conditions described above.

In the second line print m integers — the coordinates of points in the subset you have chosen.

If there are multiple answers, print any of them.

Examples

Input

6
3 5 4 7 10 12


Output

3
7 3 5

Input

5
-1 2 5 8 11


Output

1
8

Note

In the first example the answer is [7, 3, 5]. Note, that |7-3|=4=2^2, |7-5|=2=2^1 and |3-5|=2=2^1. You can't find a subset having more points satisfying the required property.

Solution (in JAVA):

Solution:
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class Solution 
{   
    public static void merge(long arr[], int l, int m, int r)
    {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;
 
        /* Create temp arrays */
        long L[] = new long[n1];
        long R[] = new long[n2];
 
        /*Copy data to temp arrays*/
        for (int i=0; i<n1; ++i)
            L[i] = arr[l + i];
        for (int j=0; j<n2; ++j)
            R[j] = arr[m + 1+ j];
 
 
        /* Merge the temp arrays */
 
        // Initial indexes of first and second subarrays
        int i = 0, j = 0;
 
        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2)
        {
            if (L[i] <= R[j])
            {
                arr[k] = L[i];
                i++;
            }
            else
            {
                arr[k] = R[j];
                j++;
            }
            k++;
        }
 
        /* Copy remaining elements of L[] if any */
        while (i < n1)
        {
            arr[k] = L[i];
            i++;
            k++;
        }
 
        /* Copy remaining elements of R[] if any */
        while (j < n2)
        {
            arr[k] = R[j];
            j++;
            k++;
        }
    }
    public static void sort(long arr[], int l, int r)
    {
        if (l < r)
        {
            // Find the middle point
            int m = (l+r)/2;
 
            // Sort first and second halves
            sort(arr, l, m);
            sort(arr , m+1, r);
 
            // Merge the sorted halves
            merge(arr, l, m, r);
        }
    }
    
    public static void main(String[] args) throws Exception
    {
        BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
        int n=Integer.parseInt(in.readLine());
        String[] l1=in.readLine().trim().split("\\s+");
        long[] ar=new long[n];
        long[] power=new long[60];
        power[0]=1L;
        power[1]=2L;
        for(int i=2;i<60;i++)
        {
            power[i]=2L*power[i-1];
        }
        //System.out.println(power[59]);
        for(int i=0;i<n;i++)
        {
            ar[i]=Long.parseLong(l1[i]);
        }
        sort(ar,0,n-1);
        boolean found=false;
        if(!found)
        {
            for(int j=1;j<=n-2;j++)
            {
                //try to find ar[j]-2^a and ar[j]+2^b and check their distance
                //System.out.println("searching for "+ar[j]);
                boolean minfound=false,maxfound=false;
                //found=false;
                int minindex=-1,maxindex=-1;
                for(int k=0;k<60;k++)
                {
                    if(!minfound)
                    {
                        //System.out.println("finding "+(ar[j]-power[k]));
                        minindex=Arrays.binarySearch(ar,ar[j]-power[k]);
                        if(minindex>=0)
                        {
                            minfound=true;
                        }
                    }
                    if(!maxfound)
                    {
                        //System.out.println("finding "+(ar[j]+power[k]));
                        maxindex=Arrays.binarySearch(ar,ar[j]+power[k]);
                        if(maxindex>=0)
                        {
                            maxfound=true;
                        }
                    }
                    if(minfound && maxfound)
                    {
                        for(int l=0;l<60;l++)
                        {
                            if(power[l]==ar[maxindex]-ar[minindex])
                            {
                                found=true;
                                break;
                            }
                        }
                    }
                    if(found)
                    {
                        break;
                    }
                }
                if(found)
                {
                    System.out.println("3");
                    System.out.println(ar[j]+" "+ar[minindex]+" "+ar[maxindex]);
                    break;
                }
            }
        }
        if(!found)
        {
            //boolean grtfound=false;
            for(int i=0;i<=n-2;i++)
            {
                //find ar[i]+2^d
                int grtindex=-1;
                for(int k=0;k<60;k++)
                {
                    grtindex=Arrays.binarySearch(ar,ar[i]+power[k]);
                    if(grtindex>0)
                    {
                        //grtfound=true;
                        found=true;
                        break;
                    }
                }
                if(found)
                {
                    System.out.println("2");
                    System.out.println(ar[i]+" "+ar[grtindex]);
                    break;
                }
            }   
        }
        if(!found)
        {
            System.out.println("1");
            System.out.println(ar[0]);
        }
    }
}