n = gets.to_i
ary = []

n.times do |i|
  ary[i] = gets.split.map(&:to_i)
end
ary2 = {}
n.times do |i|
  ((i+1)..(n-1)).each do |j|
    p = ary[i][0] - ary[j][0]
    q = ary[i][1] - ary[j][1]
    if p < 0
      p *= -1
      q *= -1
    elsif p ==0
      q = q.abs
    end
    ary2[[p,q]] ||= 0
    ary2[[p,q]] +=1
  end
end

max = ary2.values.max || 0

puts n - max    