N,*xys=$<.read.split.map(&:to_i)
xys=xys.each_slice(2).to_a.sort

h = Hash.new(0)
0.upto(N-2) do |i|
    (i+1).upto(N-1) do |j|
        p = xys[j][0] - xys[i][0]
        q = xys[j][1] - xys[i][1]
        h[[p,q]] += 1
    end
end

puts N-h.values.max