#include #include #include using namespace std; set> stars; vector> stars2; int main(void) { int n; cin >> n; for(int i = 0; i < n; i++) { int x, y; cin >> x >> y; stars.insert({x,y}); stars2.push_back({x,y}); } int count = 0; for (int i = 1; i < n; i++) { int dx = stars2[i].first - stars2[0].first; int dy = stars2[i].second - stars2[0].second; bool fail = false; for (int s = 0; s < n; s++) { pair plus = {stars2[s].first + dx, stars2[s].second + dy}; pair minus = {stars2[s].first - dx, stars2[s].second - dy}; if (stars.count(plus) == 0 && stars.count(minus) == 0) { fail = true; break; } } if (!fail) count += 1; } cout << 2 * count << endl; }