n = gets.to_i
a = []
n.times do |i|
  x,y = gets.split.map &:to_i
  a << [x,y]
end

dist = []
(0..n-1).to_a.combination(2) do |i,j|
  x = a[i][0]-a[j][0]
  y = a[i][1]-a[j][1]
  if y < 0 || (y == 0 && x < 0)
    y = -y
    x = -x
  end
  dist << [x,y]
end

cnt = dist.group_by(&:itself)
  .values
  .map(&:size)
  .max

cnt ||= 0
puts n - cnt