class Pos
  attr_accessor :x, :y

  def initialize(x, y)
    @x = x
    @y = y
  end

  def to_s
    "ball #{@x} #{@y}"
  end
end

BIG_NUM = 10**10

N = gets.chop.to_i
balls = []
N.times do |n|
  x, y = gets.chop.split.map(&:to_i)
  balls << Pos.new(x, y)
end

diffs = []
N.times do |i|
  N.times do |j|
    next if i == j
    diffs << Pos.new(balls[i].x - balls[j].x, balls[i].y - balls[j].y)
  end
end

diffs.sort! { |a, b| a.x * BIG_NUM + a.y <=> b.x * BIG_NUM + b.y }

max_same = 1
until diffs.empty?
  ct = 1
  cur = diffs.shift
  while !diffs.empty? && diffs[0].x == cur.x && diffs[0].y == cur.y
    ct += 1
    diffs.shift
  end
  max_same = [max_same, ct].max
end
puts N - max_same
