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]
    ary2.push([p.abs,q.abs])
  end
end

max = ary2.group_by{|e|e}.map{|i|i[1].size}.max

puts n - max    