#include #include #include #include #include #include #include #include #include #include #include #define rep(i,n) for(int (i) = 0; i < (n); i++) using namespace std; using ll = long long; using ull = unsigned long long; using ld = long double; //const ll mod = 1e9 + 7; const ll mod = 998244353; const int inf = 123456; const int siz = 202020; ll dist(int a , int b , int c , int d){ return (a - b)*(a - b) + (c - d)*(c - d); } int main() { int n; cin >> n; vector x(n) , y(n); for(int i = 0; i < n; i++){ cin >> x[i] >> y[i]; } vector > > v; for(int i = 0; i < n - 1; i++){ for(int j = i + 1; j < n; j++){ ll d = dist(x[i] , x[j] , y[i] , y[j]); v.push_back(make_pair(d , make_pair(i , j))); } } sort(v.begin() , v.end()); vector used(n + 100 , false); int ans = 0; for(int i = 0; i < v.size(); i++){ int x = v[i].second.first; int y = v[i].second.second; //cout << x << " : " << y << endl; if(x == 0 && y == 0){ continue; } if(used[x] == true || used[y] == true){ continue; } if(x == 0 && used[y] == false){ used[y] = true; ans++; continue; } if(y == 0 && used[x] == false){ used[x] = true; ans++; continue; } used[x] = true; used[y] = true; } cout << ans << endl; return 0; }