#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long a[1000005];
void solve() {
  long long n;
  cin >> n;
  map<long long, long long> m;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    m[a[i]] = 1;
  }
  long long flag = 0;
  pair<long long, long long> ans;
  for (long long i = 1; i <= (1 << 30); i = i << 1) {
    for (long long j = 0; j < n; ++j) {
      if (m.find(a[j] + i) != m.end() and m.find(a[j] - i) != m.end()) {
        cout << 3 << '\n';
        cout << a[j] - i << " " << a[j] << " " << a[j] + i << '\n';
        return;
      }
      if (m.find(a[j] + i) != m.end()) {
        ans = make_pair(a[j], a[j] + i);
        flag = 1;
      }
    }
  }
  if (flag) {
    cout << 2 << '\n';
    cout << ans.first << " " << ans.second << '\n';
    return;
  }
  cout << 1 << '\n';
  cout << a[0] << '\n';
  return;
  return;
}
int32_t main() {
  clock_t start = clock();
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
