import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Northwest { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line; while ((line = br.readLine()) != null && !line.isEmpty()) { int townsNo = Integer.parseInt(line); int[][] towns = new int[townsNo][2]; for (int i = 0; i < townsNo; i++) { StringTokenizer st = new StringTokenizer(br.readLine()); towns[i][0] = Integer.parseInt(st.nextToken()); towns[i][1] = Integer.parseInt(st.nextToken()); } double pairs = townsNo * townsNo; int winner = 0; for (int i = 0; i < townsNo - 1; i++) { for (int j = i + 1; j < townsNo; j++) { int[] town1; int[] town2; if (towns[i][1] < towns[j][1]){ town1 = towns[i]; town2 = towns[j]; }else { town1 = towns[j]; town2 = towns[i]; } double angle = 180*(Math.atan(Math.abs(town1[0] - town2[0])/ (double) Math.abs(town1[1] - town2[1]))/Math.PI); if (angle == 45){ winner += 2; } } } System.out.println(winner/pairs); } } }