#include using namespace std; using ll=long long; using ld=double; #define FOR(i,a,b) for(ll i=a;i<(ll)b;++i) #define F(n) FOR(i,0,n) #define FF(n) FOR(j,0,n) #define aa first #define bb second #define PB push_back #define EQ(a,b) (fabs(a-b)<=(fabs(a+b)*EPS)) int main(){ ios::sync_with_stdio(0);cout.tie(0);cin.tie(0); ll n; cin >> n; set> a; F(n) { ll x, y; cin >> x >> y; a.insert({x,y}); } ll res = 0; pair c = *a.begin(); for (auto i: a) { pair v = {c.aa - i.aa, c.bb - i.bb}; if (v.aa == 0 && v.bb == 0) continue; // test if correct bool ok = true; for (auto j: a) { if (!a.count({j.aa + v.aa, j.bb + v.bb}) && !a.count({j.aa - v.aa, j.bb - v.bb})) { ok = false; break; } } res += ok*2; } cout << res << endl; return 0; }