n = gets.chomp.to_i
s = []
h = {}
m = 0
x, y = [], []
n.times do |i|
  x[i], y[i] = gets.chomp.split.map(&:to_i)
end
n.times do |i|
  n.times do |j|
    l = [x[i] - x[j], y[i] - y[j]]
    next if l == [0, 0]
    next if s.include([l[1], l[0]])
    if !s.include?(l)
      s << l
      h[l] = 1
      m = 1 if m == 0
    else
      h[l] += 1
      m = h[l] if m < h[l]
    end
  end
end
puts n - m
