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 + 1]
  po_set << po[i]
end

max = n

diff = {}
diff2 = {}

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

#pp diff
#pp diff2

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

puts max - count
