! 2019.11.16
!
      program answer
      implicit none
      integer :: N
      double precision,allocatable,dimension(:) :: x,y
      integer :: i,j
      double precision :: ans
      intrinsic dsqrt,dble
!
      read(*,*) N
      allocate(x(N),y(N)) 
!
      ans = 0.0d0
!
      do i=1,N
        read(*,*) x(i),y(i)
      end do
!
      do i=1,N-1
        do j=i+1,N
          ans = ans + dsqrt((x(i)-x(j))**2+(y(i)-y(j))**2)
        end do
      end do
!
      ans = ans * 2 / N
      write(*,*) ans
      end program answer
