require "set"

n = gets.to_i
if n == 1
  puts 1
  exit 0
end

set = Set.new
xy = Array.new(n) do
  t = gets.strip.split(" ").map(&:to_i)
  set << "#{t[0]}x#{t[1]}" 
  t
end

diff = []

0.upto(n - 2) do |i|
  (i + 1).upto(n - 1) do |j|
    diff << [xy[j][0] - xy[i][0], xy[j][1] - xy[i][1]]
    diff << [xy[i][0] - xy[j][0], xy[i][1] - xy[j][1]]
  end
end

cost0 = 0

diff.each do |(p, q)|
  c = 0
  xy.each do |(x, y)|
    c += 1 if set.member?("#{x + p}x#{y + q}")
  end
  cost0 = c if c > cost0
end

puts n - cost0
