n = gets.to_i
xys = []
xys << [0, 0]
n.times do
  xys << gets.split.map(&:to_i)
end
xys.sort_by! { |x| x }

h = Hash.new(0)
(0..n-1).each do |i|
  x1, y1 = xys[i]
  ((i+1)..n).each do |j|
    x2, y2 = xys[j]
    h["#{x2-x1} #{y2-y1}"] += 1
  end
end
h[xys[1].join(" ")] -= 1

ans = n - h.max_by { |k,v| v }[1]
if h.size == 1
  ans += 1
end
# puts h.inspect
puts ans