import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Northwest {

    public static void main(String[] args) {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s;
        String[] sep;
        try {
            while ((s = br.readLine()) != null && !s.isEmpty()) {
                int n = Integer.parseInt(s);

                Town[] towns = new Town[n];
                int maxC = 0;
                int minC = 0;

                for (int i = 0; i < n; i++) {
                    s = br.readLine();
                    sep = s.split(" ");
                    towns[i] = new Town(Integer.parseInt(sep[0]), Integer.parseInt(sep[1]));
                    if (towns[i].c < minC) minC = towns[i].c;
                }

                for (int i = 0; i < n; i++) {
                    towns[i].y += Math.abs(minC);
                    towns[i].c += Math.abs(minC);
                    if (towns[i].c > maxC) maxC = towns[i].c;
                }

                int[] countOfTownsForC = new int[maxC+1];

                for (Town town : towns) {
                    countOfTownsForC[town.c]++;
                }

                int totalCount = 0;

                for (int con = 0; con <= maxC; con++) {
                    int countOnLine = countOfTownsForC[con];
                    if (countOnLine > 0) totalCount += countOnLine-1;
                }

                System.out.println((double) totalCount/towns.length);

            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

}


class Town{
    public int x;
    public int y;
    public int c;

    public Town(int x, int y) {
        this.x = x;
        this.y = y;
        this.c = this.y + this.x;
    }
}