#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int N; cin >> N; vector X(N), Y(N); for (int i = 0; i < N; i++) { cin >> X[i] >> Y[i]; } priority_queue>, vector>>, greater>>> que; for (int i = 0; i < N; i++) { for (int j = i + 1; j < N; j++) { que.push(make_pair((X[i] - X[j]) * (X[i] - X[j]) + (Y[i] - Y[j]) * (Y[i] - Y[j]), make_pair(i, j))); } } int res = 0; set st; while (!que.empty()) { auto q = que.top(); que.pop(); int a = q.second.first, b = q.second.second; if (a == 0 && st.find(b) == st.end()) { res++; st.insert(b); } if (st.find(a) == st.end() && st.find(b) == st.end()) { st.insert(a); st.insert(b); } } cout << res << '\n'; return 0; }