program ABC145_B
type xy
  real(16)::x,y
end type
integer N
type(xy),allocatable::town(:)
real(16) average
read*,N
allocate(town(N))
do i=1,N
    read*,town(i)%x,town(i)%y
end do
average=0
do i=1,N-1
    do j=i+1,N
        average=average+dist(town(i),town(j))
    end do
end do
average=average/real(N*(N-1)/2)
print"(f0.14)",average*(N-1)
contains
pure real(16) function dist(a,b)
    type(xy),intent(in)::a,b
    dist=sqrt((a%x-b%x)**2+(a%y-b%y)**2)
end function
end program