C = 10 ** 10
n = gets.to_i
h = Hash.new(0)
xy = []

n.times do
    x, y = gets.split.map(&:to_i)

    xy.each do |xi, yi|
        a = x - xi
        b = y - yi
        h[a * C + b] += 1
        h[-a * C - b] += 1
    end

    xy << [x, y]
end

puts n - h.values.max