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

if n == 1
    puts 1
else
    dxdy = []
    xys.combination(2).to_a.map do |c|
        p1, p2 = c
        dx = p1[0] - p2[0]
        dy = p1[1] - p2[1]

        dxdy.push [dx, dy]
        dxdy.push [-dx, -dy]
    end

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