#include using namespace std; #define rep(i, n) for(int i = 0; i < (int)(n); i++) using ll = long long; // グローバル変数 ll n; vector a, b; vector> ans; ll st = 500000000000000000; void input(){ cin >> n; rep(i, n){ ll u, v; cin >> u >> v; a.push_back(u); b.push_back(v); } } pair average(int idx1, int idx2){ return {(a[idx1]+a[idx2])/2, (b[idx1]+b[idx2])/2}; } ll score(ll num1, ll num2){ return max(st-num1, st-num2); } ll use(){ pair ret; // s{score, idx} rep(i, n-1){ pair tmp = average(0, i+1); ll tmps = score(tmp.first, tmp.second); if(tmps < ret.first) ret = {tmps, i+1}; } ans.push_back({1, ret.second+1}); pair c = average(0, ret.second); a[0] = c.first; a[ret.second] = c.first; b[0] = c.second; b[ret.second] = c.second; return ret.second; } void calc(){ rep(i, 50){ use(); } } void output(){ cout << ans.size() << endl; for(auto i : ans){ cout << i.first << " " << i.second << endl; } } int main(){ input(); calc(); output(); }