#include <bits/stdc++.h>
using namespace std;
const long long NMAX = 2e5 + 5, INF = 1e15 + 7, END = 1e5;
vector<long long> v;
set<long long> a;
int main() {
  long long step = 1;
  while (step <= 10000000000) {
    v.push_back(step);
    step *= 2;
  }
  long long n;
  cin >> n;
  for (long long i = 0; i < n; ++i) {
    long long x;
    cin >> x;
    a.insert(x);
  }
  vector<long long> answer;
  answer.push_back(*a.begin());
  for (long long x : a) {
    for (long long i = 0; i < (long long)v.size(); ++i) {
      if (a.find(x + v[i]) != a.end()) {
        if (i != 0 && a.find(x + v[i - 1]) != a.end()) {
          answer.clear();
          cout << "3\n" << x << " " << x + v[i - 1] << " " << x + v[i];
          return 0;
        } else {
          answer.clear();
          answer.push_back(x);
          answer.push_back(x + v[i]);
        }
      }
    }
  }
  cout << answer.size() << "\n";
  for (long long x : answer) cout << x << " ";
}
