N=gets.to_i

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

diffs=Hash.new(0)
N.times do |i|
  N.times do |j|
    next if i==j
    str="#{points[i][0]-points[j][0]},#{points[i][1]-points[j][1]}"
    diffs[str]+=1
  end
end
max=0
diffs.each do |str,i|
  max=[max,i].max
end
puts N-max