#include #include #define pr pair using namespace std; set stars; set tested_vectors; int sum = 0; bool exist(pr star){ return stars.find(star) != stars.end(); } pr get_vector(pr a, pr b){ a.first = b.first - a.first; a.second = b.second - a.second; return a; // if (x >= y) } pr sum_pairs(pr a, pr b){ a.first = b.first + a.first; a.second = b.second + a.second; return a; } void test_vector(pr vec){ for (auto it = stars.begin(); it != stars.end(); ++it){ if (!exist(sum_pairs(*it, vec)) && !exist(get_vector(vec, *it))){ return; } } // cout << vec.first << " " << vec.second << endl; sum += 2; } int main() { int n; cin >> n; for (int i = 0; i < n; ++i) { int a, b; cin >> a >> b; pr p; p.first = a; p.second = b; stars.insert(p); } pr vec; vec.first = 0; vec.second = 0; tested_vectors.insert(vec); for (auto it = stars.begin(); it != stars.end(); ++it){ for (auto it2 = stars.begin(); it2 != stars.end(); ++it2){ vec = get_vector(*it, *it2); if (tested_vectors.find(vec) == tested_vectors.end()){ // cout << "test: "<< vec.first << " " << vec.second << endl; test_vector(vec); tested_vectors.insert(vec); vec.first *= -1; vec.second *= -1; tested_vectors.insert(vec); } } } std::cout << sum << std::endl; return 0; }