n = gets.chomp.to_i
xy = []
x = []
y = []

if n == 1
    puts "1"
else

    for i in 1..n do
        input = gets.chomp.split(" ").map(&:to_i)
        xy.push(input) 
    end

    xy.sort! {|a,b| (a[0] <=> b[0]).nonzero? || (a[1] <=> b[1])}
    dif = []
    count_max = 0
    for i in 1..n-1 do
        for j in i+1..n do
            x0 = xy[j-1][0] - xy[i-1][0]
            y0 = xy[j-1][1] - xy[i-1][1]
            dif.push([x0,y0])
        end
    end

    dif.sort! {|a,b| (a[0] <=> b[0]).nonzero? || (a[1] <=> b[1])}
    


    count = 1
    tar = dif[0]
    size = dif.length
    for i in 1..(size -1)
        if dif[i] == tar
            count += 1
        else
            if count_max < count 
                count_max = count                
            end
            count = 1
            tar = dif[i]
        end
    end
    p n - count_max
end