#include <bits/stdc++.h>   using namespace std;   int main() {     std::ios::sync_with_stdio(false);     std::cin.tie(0);     long long n;     cin >> n;     vector<int> v(n);     for (int i = (0); i < (n); ++i) cin >> v[i];     sort(v.begin(), v.end());     vector<int> res = {v[0]};     for (int i = (0); i < (n); ++i)       for (int j = (0); j < (31); ++j) {         int lx = v[i] - (1 << j);         int rx = v[i] + (1 << j);         bool isl = binary_search(v.begin(), v.end(), lx);         bool isr = binary_search(v.begin(), v.end(), rx);         if (isl && isr && int(res.size()) < 3) {           res = {lx, v[i], rx};         }         if (isl && int((int)res.size()) < 2) {           res = {lx, v[i]};         }       }     cout << (int)res.size() << endl;     for (auto it : res) cout << it <<    ;   }   