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.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Stack;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;
import java.util.StringTokenizer;
import java.util.TreeSet;
import java.util.logging.Level;
import java.util.logging.Logger;

public class Main {

	public static class CC {
		public int i, j, d;

		public CC() {

		}

		@Override
		public int hashCode() {
			return d;
		}

		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (getClass() != obj.getClass())
				return false;
			CC other = (CC) obj;
			if (d != other.d)
				return false;
			return true;
		}
	}

	public static void main(String[] args) throws IOException {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		PrintWriter out = new PrintWriter(outputStream);
		InputReader in = new InputReader(inputStream);

		int n = in.nextInt();
		long[] x = new long[n];
		Set<Long> S = new HashSet<Long>();
		for (int i = 0; i < n; i++) {
			x[i] = in.nextLong();
			S.add(x[i]);
		}
		//Arrays.sort(x);
		// 3
		for (int i = 0; i < n; i++) {
			for (int k = 0; k <= 32; k++) {
				if (S.contains(x[i] + (1L << k)) && S.contains(x[i] + (1L << k) + (1L << k))) {
					out.println(3);
					out.println(x[i] + " " + (x[i] + (1L << k)) + " " + (x[i] + (1L << k) + (1L << k)));
					out.close();
					return;
				}
			}
		}
		// 2
		for (int i = 0; i < n; i++) {
			for (int k = 0; k <= 32; k++) {
				if (S.contains(x[i] + (1L << k))) {
					out.println(2);
					out.println(x[i] + " " + (x[i] + (1L << k)));
					out.close();
					return;
				}
			}
		}
		out.println(1);
		out.println(x[0]);
		out.close();
	}

	static class InputReader {

		BufferedReader reader;
		StringTokenizer tokenizer;

		public InputReader(InputStream inputStream) {
			reader = new BufferedReader(new InputStreamReader(inputStream), 32624);
			tokenizer = null;
		}

		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException ex) {
				}
			}
			return tokenizer.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		private long nextLong() {
			return Long.parseLong(next());
		}

		private double nextDouble() {
			return Double.parseDouble(next());
		}

		public int[] nextArray(int n) {
			int[] a = new int[n];
			for (int i = 0; i < n; i++) {
				a[i] = nextInt();
			}
			return a;
		}

		public long[] nextArrayl(int n) {
			long[] a = new long[n];
			for (int i = 0; i < n; i++) {
				a[i] = nextLong();
			}
			return a;
		}

		public double[] nextArrayd(int n) {
			double[] a = new double[n];
			for (int i = 0; i < n; i++) {
				a[i] = nextDouble();
			}
			return a;
		}

		private BigInteger nextBigInteger() {
			return new BigInteger(next());
		}

		public void printAr(int[] a) {
			System.out.print("[");
			for (long x : a) {
				System.out.print(x + ",");
			}
			System.out.print("]");
		}
	}

}