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

public class NorthWest {

    public static void main(String[] args) {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s;
        String[] sep;
        boolean[][] thereIsTown;
        try {
            while ((s = br.readLine()) != null && !s.isEmpty()) {
                ArrayList<Town> towns = new ArrayList<>();

                int n = Integer.parseInt(s);
                int maxX = 0;
                int maxY = 0;

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

                int max = 2+maxX+maxY;

                thereIsTown = new boolean[max][max];
                //thereIsTown = new boolean[maxX+2][maxY+2];

                int rightBorderX = 0;
                for (Town town : towns) {
                    if ((town.x + town.y) > rightBorderX) rightBorderX = (town.x + town.y);
                    thereIsTown[town.x][town.y] = true;
                }

                int nwC = 0;

                int y;
                for (int x = 0; x <= rightBorderX; x++) {
                    y = 0;
                    int count = -1;
                    for (int xx = x; (xx >= 0)&&(y < thereIsTown[0].length); xx--) {
                        if ((xx < thereIsTown.length)&&(y < thereIsTown[0].length)) {
                            if (thereIsTown[xx][y]) count++;
                        }
                        y++;
                    }
                    nwC += count != -1 ? count : 0;
                }

                System.out.println((float)nwC/towns.size());

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

}


class Town{
    public int x;
    public int y;

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