# frozen_string_literal: true

n = gets.to_i
xy = n.times.map { gets.split.map(&:to_i) }.sort

if n == 1
  puts 1
  exit
end

h = Hash.new(0)

xy.combination(2).each do |c|
  h[[c[0][0] - c[1][0], c[0][1] - c[1][1]]] += 1
end
puts n - h.max_by { |_k, v| v }[1]
