import java.util.PriorityQueue; import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] x = new int[n]; int[] y = new int[n]; for (int i = 0; i < n; i++) { x[i] = sc.nextInt(); y[i] = sc.nextInt(); } sc.close(); PriorityQueue que = new PriorityQueue<>((o1, o2) -> Long.compare(o1.d, o2.d)); for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { Obj o = new Obj(); o.a = i; o.b = j; long dx = x[i] - x[j]; long dy = y[i] - y[j]; o.d = dx * dx + dy * dy; que.add(o); } } int ans = 0; boolean[] used = new boolean[n]; while (!que.isEmpty()) { Obj o = que.poll(); if (used[o.a] || used[o.b]) { continue; } if (o.a != 0 && o.b != 0) { used[o.a] = true; used[o.b] = true; } else { int c = o.a; if (c == 0) { c = o.b; } used[c] = true; ans++; } } System.out.println(ans); } static class Obj { int a, b; long d; } }