n = gets.strip.to_i
xys = n.times.map { gets.strip.split.map(&:to_i) }

dxdy = []
xys.combination(2).to_a.each do |c|
    p1, p2 = c
    dxdy.push [(p1[0] - p2[0]).abs, (p1[1] - p2[1]).abs]
end

count = dxdy.group_by(&:itself).map { |k, v| [v.size, k] }.max_by(&:first)[0]
puts n - count
