#include #define FOR(a, b, c) for(int a = b; a < c; ++a) #define MP make_pair #define PB push_back using namespace std; typedef long long LL; vector > points; bool check(int x, int y) { set > stars; for(auto& i : points){ stars.insert(i); } for(auto& i : points) { if(!stars.count(MP(i.first + x, i.second + y)) && !stars.count(MP(i.first - x, i.second - y))) return false; } return true; } int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n; cin >> n; if(n == 0 || n == 1) { cout << 0; return 0; } FOR(i, 0, n) { int a, b; cin >> a >> b; points.PB(MP(a, b)); } int res = 0; FOR(i, 1, n) { if(points[i].first == points[0].first && points[i].second == points[0].second) continue; if(check(points[i].first - points[0].first, points[i].second - points[0].second)) res += 2; } cout << res; return 0; }