#include using namespace std; typedef long long ll; int main() { priority_queue,vector>,greater>> que; int N; cin >> N; vector x(N); vector y(N); for(int i = 0;i < N;i++){ cin >> x[i] >> y[i]; } for(int i = 0;i < N-1;i++){ for(int j = i+1;j < N;j++){ ll x1 = x[i]; ll x2 = x[j]; ll y1 = y[i]; ll y2 = y[j]; que.push(make_tuple((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2),i,j)); } } vector used(N,false); int cnt = 0; while(que.size()){ ll d,i,j; tie(d,i,j) = que.top(); que.pop(); if(used[i] || used[j])continue; if(i == 0 || j == 0){ cnt++; used[max(i,j)] = true; } else used[i] = used[j] = true; } cout << cnt << endl; }