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

k1 = x.sort{|a,b| a[1] <=> b[1]}.combination(2)
k2 = []
k1.to_a.each do |k|
    k2.push([k[1][0]-k[0][0], k[1][1]-k[0][1]])
end
max_n = k2.group_by(&:itself).max_by{|_,v| v.size}[1].length
p N-max_n