n = gets.to_i
x,y = 2.times.map{Array.new(n)}
n.times do |i|
    x[i],y[i] = gets.split.map(&:to_i)
end
a = Hash.new(0)
n.times do |i|
    n.times do |j|
        next if i == j
        a[(x[i]-x[j])*(10**10)+y[i]-y[j]] += 1
    end
end
m = a.values.max
if n == 1
    m = 0
end
puts n-m