import Control.Monad
import Data.List

solver :: [(Int, Int)] -> Int
solver ls =
  let n = length ls
   in if n == 1
        then 1
        else let dist_pat =
                   [ (x1 - x2, y1 - y2)
                   | (x1, y1) <- ls
                   , (x2, y2) <- ls
                   , (x1 /= x2 || y1 /= y2)
                   ]
              in n -
                 ((head .
                   sortBy (\a -> \b -> compare b a) . map length . group . sort)
                    dist_pat)

main :: IO ()
main = do
  n <- read <$> getLine
  dat <-
    forM [1 .. n] (\_ -> ((\(x:y:_) -> (x, y)) . map read . words) <$> getLine)
  print $ solver dat