program main

  implicit none
  integer(8) :: i, a,b,c,d,e,f,g,h,n 
  integer(8), allocatable :: x(:), y(:)
  real(8) :: dis, tmp
  
  read(*,*) n 
  allocate( x(n) )
  allocate( y(n) )
  if( n < 2 .or. n > 8 ) stop

  do i = 1, n
    read(*,*) x(i), y(i) 
    if( x(i) < -1000 .or. x(i) > 1000 ) stop
    if( y(i) < -1000 .or. y(i) > 1000 ) stop
  end do
  
  
  dis = 0e0
  do a = 1, n
    do b = 1, n
      if( b == a ) cycle
      if( x(a) == x(b) .and. y(a) == y(b) ) stop
      tmp = (x(a) - x(b))**2e0 + (y(a) - y(b))**2e0
      dis = dis + dsqrt( tmp ) 
      do c = 1, n
        if( n < 3 ) exit
        if( c == a .or. c == b ) cycle
        if( x(c) == x(b) .and. y(c) == y(b) ) stop
        tmp = (x(c) - x(b))**2e0 + (y(c) - y(b))**2e0
        dis = dis + dsqrt( tmp ) 
        do d = 1, n
          if( n < 4 ) exit
          if( d == a .or. d == b .or. d == c ) cycle
          if( x(c) == x(d) .and. y(c) == y(d) ) stop
          tmp = (x(c) - x(d))**2e0 + (y(c) - y(d))**2e0
          dis = dis + dsqrt( tmp ) 
          do e = 1, n
            if( n < 5 ) exit
            if( e == a .or. e == b .or. e == c .or. e == d ) cycle
            if( x(e) == x(d) .and. y(e) == y(d) ) stop
            tmp = (x(e) - x(d))**2e0 + (y(e) - y(d))**2e0
            dis = dis + dsqrt( tmp ) 
            do f = 1, n
              if( n < 6 ) exit
              if( f == a .or. f == b .or. f == c .or. f == d .or. f == e ) cycle
              if( x(e) == x(f) .and. y(e) == y(f) ) stop
              tmp = (x(e) - x(f))**2e0 + (y(e) - y(f))**2e0
              dis = dis + dsqrt( tmp ) 
              do g = 1, n
                if( n < 7 ) exit
                if( g == a .or. g == b .or. g == c .or. g == d .or. g == e .or. g == f ) cycle
                if( x(g) == x(f) .and. y(g) == y(f) ) stop
                tmp = (x(g) - x(f))**2e0 + (y(g) - y(f))**2e0
                dis = dis + dsqrt( tmp ) 
                do h = 1, n
                  if( n < 8 ) exit
                  if( h == a .or. h == b .or. h == c .or. h == d .or. h == e .or. h == f .or. h == g ) cycle
                  if( x(g) == x(h) .and. y(g) == y(h) ) stop
                  tmp = (x(g) - x(h))**2e0 + (y(g) - y(h))**2e0
                  dis = dis + dsqrt( tmp ) 
                end do
              end do
            end do
          end do
        end do
      end do
    end do
  end do

  do i = 1, n
    dis = dis / real( i )
  end do

  print*, dis

  deallocate( x )
  deallocate( y )
end program main
