program main

  implicit none
  integer :: i,j,n 
  integer, allocatable :: x(:), y(:)
  real :: dis, tmp
  
  read(*,*) n 
  allocate( x(n) )
  allocate( y(n) )

  do i = 1, n
    read(*,*) x(i), y(i) 
  end do
  
  dis = 0e0
  do i = 1, n
    do j = i, n
      if ( j == i ) cycle
      tmp = (x(i) - x(j))**2e0 + (y(i) - y(j))**2e0
      dis = dis + sqrt( tmp ) 
    end do
  end do
  do i = 1, n
    dis = dis / real( i )
  end do
  print*, dis

  deallocate( x )
  deallocate( y )
end program main
