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:
/*
If you want to aim high, aim high
Don't let that studying and grades consume you
Just live life young
******************************
What do you think? What do you think?
1st on Billboard, what do you think of it
Next is a Grammy, what do you think of it
However you think, I’m sorry, but shit, I have no fcking interest
*******************************
I'm standing on top of my Monopoly board
That means I'm on top of my game and it don't stop
til my hip don't hop anymore
https://www.a2oj.com/Ladder16.html
*******************************
300iq as writer = Sad!
*/
import java.util.*;
import java.io.*;
import java.math.*;

   public class D2
   {
      public static void main(String hi[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int N = Integer.parseInt(st.nextToken());
         long[] arr = new long[N];
         st = new StringTokenizer(infile.readLine());
         HashSet<Long> set = new HashSet<Long>();
         for(int i=0; i < N; i++)
         {
            arr[i] = Long.parseLong(st.nextToken());
            set.add(arr[i]);
         }
         ArrayList<Long> res = new ArrayList<Long>();
         outer:for(int i=0; i < N; i++)
            if(i == 0 || arr[i] != arr[i-1])
               for(int b=0; b <= 31; b++)
               {
                  long diff = 1L<<b;
                  if(set.contains(arr[i]-diff))
                     break;
                  ArrayList<Long> temp = new ArrayList<Long>();
                  temp.add(arr[i]);
                  long curr = arr[i]+diff;
                  while(set.contains(curr))
                  {
                     temp.add(curr);
                     curr += diff;
                     if(temp.size() == 3)
                        break;
                  }
                  if(temp.size() > res.size())
                  {
                     res = temp;
                     if(res.size() == 3)
                        break outer;
                  }
               }
         System.out.println(res.size());
         StringBuilder sb = new StringBuilder();
         for(long x: res)
            sb.append(x+" ");
         System.out.println(sb);   
      }
   }