require 'set'
require 'pp'

n = gets.chomp!.to_i
po = []
po_set = SortedSet.new
n.times do |i|
  x, y = gets.chomp!.split(" ").map!(&:to_i)
  po[i] = [x, y, i]
  po_set << po[i]
end

max = n

diff = {}

# 2点を選んだときの相対距離
po.combination(2).each do |po1, po2|
  diff_x = po1[0] - po2[0]
  diff_y = po1[1] - po2[1]
  diff["#{diff_x},#{diff_y}"] = (diff["#{diff_x},#{diff_y}"] || 0) + 1
end

count = diff.inject(0) {|max, (_, v)| max = (v > max) ? v : max } 

puts max - count
