#include #include #include #include using namespace std; int gcd(int a,int b) { while(b) { int t=a%b; a=b; b=t; } return a; } int N; int X[1000],Y[1000]; map,vector > >mp1,mp2; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cin>>N; for(int i=0;i>X[i]>>Y[i]; for(int i=0;i,int>cnt; for(auto q:p.second)cnt[q]++; for(auto q:it->second)ans+=cnt[q]; } cout<