#include #include #include #include #include #include #include using namespace std; using ll = long long; struct P { int x, y; }; struct Q { bool operator<(const Q &q) const { return d < q.d; } ll d; int i, j; }; int main() { ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; vector

p(n); vector q(n * (n - 1) / 2); int h = 0; for (int i = 0; i < n; i++) { int x, y; cin >> x >> y; p[i] = { x, y }; for (int j = 0; j < i; j++) { ll dx = x - p[j].x; ll dy = y - p[j].y; q[h++] = { dx * dx + dy * dy, i, j }; } } sort(q.begin(), q.end()); vector b(n, 1); int r = 0; for (auto [d, i, j] : q) { if (b[i] && b[j]) { if (j == 0) { b[i] = 0; r++; } else { b[i] = b[j] = 0; } } } cout << r << endl; return 0; }