import Control.Applicative import Control.Monad import Data.Maybe import Data.Graph import qualified Data.ByteString.Char8 as B hypot2 x y = x*x+y*y solve n ls = bsearch 0 200000000 where dst = [([(i,j),(j,i)],hypot2 (xi-xj) (yi-yj))|(i,[xi,yi])<-zip [0..] ls,(j,[xj,yj])<-zip [0..] ls,i=r = l*10 | check = bsearch l c | otherwise = bsearch (c+1) r where c = (l+r)`div`2 check = path gr 0 (n-1) gr = buildG (0,n-1) $ concatMap fst $ filter ((100*c*c>=).snd) dst main = do n <- fst . fromJust . B.readInt <$> B.getLine ls <- replicateM n $ map (fst . fromJust . B.readInt) . B.words <$> B.getLine print $ solve n ls