// g++ A.cpp -std=c++14 -I . && ./a.out #include using namespace std; // #include // using namespace atcoder; // using mint = modint1000000007; // using mint = modint998244353; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, a, b) for (int i = a; i < (int)(b); i++) #define all(v) v.begin(), v.end() using ll = long long; const ll INF = 1e18; // 変数定義 int N, M, Q, a, b, c, e, x, y, T, total, cnt, ans; ll pow(ll x, ll n) { ll res = 1; while (n > 0) { if (n & 1) res *= x; // n の最下位bitが 1 ならば x^(2^i) をかける x *= x; n >>= 1; // n を1bit 左にずらす } return res; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cin >> N; vector X(N), Y(N); rep(i, N) { cin >> X[i] >> Y[i]; } vector> dists; rep(i, N) { rep2(j, i + 1, N) { dists.push_back({pow(abs(X[i] - X[j]), 2LL) + pow(abs(Y[i] - Y[j]), 2LL), i, j}); } } sort(all(dists)); vector check(N, false); for (auto dist : dists) { // cout << dist[0] << ' ' << dist[1] << ' ' << dist[2] << '\n'; // cout << ans << '\n'; if (dist[1] == 0) { if (check[dist[2]] == false) { ans++; check[dist[2]] = true; } } else if (check[dist[1]] == false && check[dist[2]] == false) { check[dist[1]] = true; check[dist[2]] = true; } } cout << ans << '\n'; return 0; }