# frozen_string_literal: true

n = gets.to_i
xy = n.times.map { gets.split.map(&:to_i) }.sort

h = Hash.new(0)

1.upto(n - 1) do |i|
  h[[xy[i][0] - xy[i - 1][0], xy[i][1] - xy[i - 1][1]]] += 1
end

puts n - h.max_by { |_k, v| v }[1]
