N = gets.to_i
x = N.times.map{gets.split.map(&:to_i)}

hash = Hash.new

N.times do |i|
    N.times do |j|
        next if i==j
        new_x = x[i][0] - x[j][0]
        new_y = x[i][1] - x[j][1]
        hash["#{new_x},#{new_y}"]||=0
        hash["#{new_x},#{new_y}"]+=1
    end
end

puts N-(hash.values.max||0)