(* O(n^4) *)
let n = Scanf.scanf " %d" @@ (+) 0
let xys = Array.init n @@ fun _ -> Scanf.scanf " %d %d" @@ fun a b -> a, b
let ans = ref max_int
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
        let e = ref 0 in
        xys |> Array.iter @@ fun (x1, y1) ->
          (xys |> Array.iter @@ fun (x2, y2) ->
            if x2 - x1 = p && y2 - y1 = q then incr e);
          ans := min !ans @@ n - !e);
  Printf.printf "%d\n" @@ !ans