let n = Scanf.sscanf (read_line ()) "%d" @@ fun n -> n
let xy = Array.init n @@ fun _ -> Scanf.sscanf (read_line ()) "%d %d" @@ fun x y -> (x, y)

module IntMap = Map.Make(struct type t = (int * int) let compare = compare end)

let () =
  let map = Array.fold_left (fun m s -> Array.fold_left (fun m t -> 
    if s = t then m
    else
      let (x1, y1), (x2, y2) = s, t in
      let key = (x1 - x2, y1 - y2) in
      try 
        IntMap.add key ((IntMap.find key m) + 1) m
      with Not_found ->
        IntMap.add key 1 m
  ) m xy) IntMap.empty xy in
  Printf.printf "%d\n" @@ n - IntMap.fold (fun _ -> max) map 0
  