#include <bits/stdc++.h>
using namespace std;
long long n, k, a[200005], ans, pwr, last, cr, i, l;
map<long long, int> fix;
int main() {
  cin >> n;
  for (k = 1; k <= n; k++) {
    cin >> a[k];
    fix[a[k]] = 1;
  }
  sort(a + 1, a + n + 1);
  l = log2(a[n] - a[1]);
  for (k = 1; k <= n; k++) {
    for (i = 0; i <= l; i++) {
      cr = 1 << i;
      if (fix[a[k] - cr] == 1) {
        if (ans < 2) {
          ans = 2;
          pwr = cr;
          last = a[k];
        }
        if (fix[a[k] - 2 * cr] == 1) {
          if (ans < 3) {
            ans = 3;
            pwr = cr;
            last = a[k];
          }
        }
      } else if (ans == 0) {
        ans = 1;
        pwr = cr;
        last = a[k];
      }
    }
  }
  if (ans == 0) {
    cout << 1 << endl;
    cout << a[1] << endl;
    return 0;
  }
  cout << ans << endl;
  while (ans) {
    ans--;
    cout << last << " ";
    last -= pwr;
  }
}
