(* O(n^2) *)
let n = Scanf.scanf " %d" @@ (+) 0
let xys = Array.init n @@ fun _ -> Scanf.scanf " %d %d" @@ fun a b -> a, b
let h = Hashtbl.create @@ n * n
let _ =
  if n = 1 then (print_endline "1"; exit 0);
  (xys |> Array.iteri @@ fun i (x0, y0) ->
    xys |> Array.iteri @@ fun j (x, y) ->
      if i <> j then
        let p, q = x - x0, y - y0 in
        try let e = Hashtbl.find h (p, q) in Hashtbl.add h (p, q) @@ e + 1 with
        _ -> Hashtbl.add h (p, q) 1);
  Hashtbl.fold (fun _ e acc -> min acc @@ n - e) h max_int |> Printf.printf "%d\n"