import Data.Bits
import Data.Foldable (foldlM,foldrM)
import Data.Maybe (fromMaybe)
import Data.List
import qualified Data.Vector.Unboxed.Mutable as V
import Control.Monad
import qualified Data.ByteString.Lazy.Char8 as B
--import Debug.Trace

findrem :: Eq a => a -> [a] -> Maybe [a]
findrem x [] = Nothing
findrem x (a:as) = if x == a then Just as
  else case (findrem x as) of
    Nothing -> Nothing
    Just as' -> Just $ a:as'

remove1 :: Int -> (Int,Int) -> (Int,Int) -> [(Int,Int)] -> [(Int,Int)]
remove1 n (p,q) (x,y) ps = case findrem (x+p,y+q) ps of
  Nothing -> ps
  Just ps'-> remove1 n (p,q) (x+p,y+q) ps'

solve' :: Int -> (Int,Int) -> [(Int,Int)] -> Int
solve' _ _ [] = 0
solve' n (p,q) ps = 1 + (solve' n (p,q) $ remove1 n (p,q) (head ps) (tail ps))

solve :: Int -> [(Int,Int)] -> Int
solve n ps' = let ps = sortOn (\(x,y) -> x+y) ps'
  in minimum [solve' n (p,q) ps | (p,q) <- [(x'-x,y'-y)| (x,y) <- ps, (x',y') <- ps, x < x' || y < y']]

main :: IO ()
main = do
  n <- readLn
  ps <- replicateM n $ do
    [x,y] <- map read.words <$> getLine :: IO [Int]
    return (x,y)
  print $ solve n ps
