func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     long long n, x, y;     map<long long, long long> mx, my;     map<tuple<long long, long long>, long long> mt;     scanf( %lld , &n);     for (int i = 0; i < n; i++) {       scanf( %lld%lld , &x, &y);       tuple<long long, long long> a = make_tuple(x, y);       mx[x]++;       my[y]++;       mt[a]++;     }     long long ans = 0;     for (auto a : mx) {       long long b = a.second;       ans += b * (b - 1) / 2;     }     for (auto a : my) {       long long b = a.second;       ans += b * (b - 1) / 2;     }     for (auto a : mt) {       long long b = a.second;       ans -= b * (b - 1) / 2;     }     printf( %lld n , ans);   }   