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.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.InputMismatchException;
import java.util.*;
public class Tester {

	public static void main(String[] args) {
		 int mod = (int) (1e9 + 7);
		 InputReader in = new InputReader(System.in);
		 PrintWriter out = new PrintWriter(System.out);
		 
		 int n = in.nextInt();
		 ArrayList<Integer> arr = new ArrayList<Integer>();
		 HashSet<Integer> hs = new HashSet<Integer>();
		 for(int i=0;i<n;i++) {
			 arr.add(in.nextInt());
			 hs.add(arr.get(i));
		 }
		 Collections.sort(arr);
		 
		 boolean found = false;
		 int a=0,b=0,c=0;
		 int size = 3;
		 for(int i=1;i<n-1 && !found;i++) {
			for(int j=0;j<=30 && !found;j++) {
				int diff = (int) pow(2,j);
				int e1 = arr.get(i) - diff;
				int e2 = arr.get(i) + diff;
				if(hs.contains(e1) && hs.contains(e2)) {
					found = true;
					a = e1;
					b = arr.get(i);
					c = e2;
				
				}
			}
		 }
		 
		 if(!found) {
			 size = 2;
			 for(int i=0;i<n-1 && !found;i++) {
				 for(int j=0;j<=30 && !found;j++) {
					 int diff = (int) pow(2,j);
					 int e = arr.get(i) + diff;
					 if(hs.contains(e)) {
						 found = true;
						 a = arr.get(i);
						 b = e;
					 }
				 }
			 }
		 }
		 
		 if(!found) {
			 out.println(1);
			 out.println(arr.get(0));
		 }
		 else {
			 if(size==2) {
				 out.println(2);
				 out.println(a + " " +b);
			 }
			 else {
				 out.println(3);
				 out.println(a + " " +b+ " "+c);
			 }
		 }
		 out.close();

	}

	static long fac(long a) {
		long k = a;
		for (long i = 2; i < a; i++) {
			k = k * i;
		}
		System.out.println(k + " " + a);

		return a;

	}

	static class Pair implements Comparable<Pair> {

		long x, y;
		int i;

		Pair(long x, long y) {
			this.x = x;
			this.y = y;
			//this.i = i;
		}

		@Override
		public int compareTo(Pair o) {
			if (this.x != o.x) {
				return Long.compare(this.x, o.x);
			} else {
				return Long.compare(this.y, o.y);
				// return 0;
			}
		}

		@Override
		public boolean equals(Object o) {
			if (o instanceof Pair) {
				 Pair p = (Pair) o;
				return p.x == x && p.y == y && p.i == i;
			}
			return false;
		}
	}

	public static boolean isPal(String s) {
		for (int i = 0, j = s.length() - 1; i <= j; i++, j--) {
			if (s.charAt(i) != s.charAt(j)) {
				return false;
			}
		}
		return true;
	}

	public static String rev(String s) {
		 StringBuilder sb = new StringBuilder(s);
		sb.reverse();
		return sb.toString();
	}

	public static long gcd(long x, long y) {
		if (x % y == 0) {
			return y;
		} else {
			return gcd(y, x % y);
		}
	}

	public static int gcd(int x, int y) {
		if (x % y == 0) {
			return y;
		} else {
			return gcd(y, x % y);
		}
	}

	public static long gcdExtended(long a, long b, long[] x) {

		if (a == 0) {
			x[0] = 0;
			x[1] = 1;
			return b;
		}
		 long[] y = new long[2];
		 long gcd = gcdExtended(b % a, a, y);

		x[0] = y[1] - (b / a) * y[0];
		x[1] = y[0];

		return gcd;
	}

	public static int abs(int a, int b) {
		return Math.abs(a - b);
	}

	public static long abs(long a, long b) {
		return Math.abs(a - b);
	}

	public static int max(int a, int b) {
		if (a > b) {
			return a;
		} else {
			return b;
		}
	}

	public static int min(int a, int b) {
		if (a > b) {
			return b;
		} else {
			return a;
		}
	}

	public static long max(long a, long b) {
		if (a > b) {
			return a;
		} else {
			return b;
		}
	}

	public static long min(long a, long b) {
		if (a > b) {
			return b;
		} else {
			return a;
		}
	}

	public static long pow(long n, long p, long m) {
		long result = 1;
		if (p == 0) {
			return 1;
		}
		if (p == 1) {
			return n;
		}
		while (p != 0) {
			if (p % 2 == 1) {
				result *= n;
			}
			if (result >= m) {
				result %= m;
			}
			p >>= 1;
			n *= n;
			if (n >= m) {
				n %= m;
			}
		}
		return result;
	}

	public static long pow(long n, long p) {
		long result = 1;
		if (p == 0) {
			return 1;
		}
		if (p == 1) {
			return n;
		}
		while (p != 0) {
			if (p % 2 == 1) {
				result *= n;
			}
			p >>= 1;
			n *= n;
		}
		return result;
	}

	static class InputReader {

		private  InputStream stream;
		private  byte[] buf = new byte[8192];
		private int curChar, snumChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int snext() {
			if (snumChars == -1) {
				throw new InputMismatchException();
			}
			if (curChar >= snumChars) {
				curChar = 0;
				try {
					snumChars = stream.read(buf);
				} catch ( IOException e) {
					throw new InputMismatchException();
				}
				if (snumChars <= 0) {
					return -1;
				}
			}
			return buf[curChar++];
		}

		public int nextInt() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9') {
					throw new InputMismatchException();
				}
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public long nextLong() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9') {
					throw new InputMismatchException();
				}
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

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

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

		public String readString() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			 StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public String nextLine() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			 StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isEndOfLine(c));
			return res.toString();
		}

		public boolean isSpaceChar(int c) {
			if (filter != null) {
				return filter.isSpaceChar(c);
			}
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		private boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}
}