program prob3
    implicit none
    integer :: n
    real(8), allocatable :: x(:), y(:)
    real(8) :: ans
    integer :: i, j
    read(*,*) n
    allocate(x(n), y(n))
    do i = 1, n
        read(*,*) x(i), y(i)
    end do
    ans = 0
    do i = 1, n
        do j = 1, n
            if(i == j) then
                cycle
            end if
            ans = ans + sqrt( (x(i) - x(j)) ** 2 + (y(i) - y(j)) ** 2  )
        end do
    end do
    ans = ans / dble(n)
    write(*,*) ans
    deallocate(x, y)
    stop
contains
end program prob3