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;
        try {
            while ((s = br.readLine()) != null && !s.isEmpty()) {
                ArrayList<Town> towns = new ArrayList<>();

                int n = Integer.parseInt(s);
                int maxC = 0;
                int minC = 0;

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


                int totalCount = 0;

                for (int con = minC; con <= maxC; con++) {
                    int countOnLine = -1;
                    for (Town town : towns) {
                        if (town.c == con) countOnLine++;
                    }
                    if (countOnLine > 0) totalCount += countOnLine;
                }

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

            }
        } 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;
    }
}