#include #include #include #include using namespace std; struct d{ int x,y; long long l; const bool operator<(d b){ if(l == b.l){ if(x == b.x){ return y < b.y; } return x < b.x; } return l < b.l; } }; int main(){ int n;cin>>n; vector> A(n); for(int i = 0; n > i; i++){ cin>>A[i].first>>A[i].second; } vector B; for(int i = 0; n > i; i++){ for(int j = i+1; n > j; j++){ B.push_back({i,j,(A[i].first-A[j].first)*(A[i].first-A[j].first)+(A[i].second-A[j].second)*(A[i].second-A[j].second)}); } } sort(B.begin(),B.end()); set X; int ans = 0; for(int i = 0; B.size() > i; i++){ if(B[i].x == 0){ if(!X.count(B[i].y)){ ans++; X.insert(B[i].y); } }else{ if(!X.count(B[i].x) && !X.count(B[i].y)){ X.insert(B[i].x); X.insert(B[i].y); } } } cout << ans << endl; }