import Data.List
import Control.Monad

solve n xy = n - m where
  m = maximum . (0:) . map length . group $ sort difs
  difs = [(a-x, b-y) | p@(a,b)<-xy, q@(x,y)<-xy, p/=q]

main = do
  n <- readLn
  xy <- replicateM n read2
  print $ solve n xy

read2 = (\[a,b] -> (a,b)) <$> readWords
readWords = map read . words <$> getLine