N,*xys=$<.read.split.map(&:to_i)
xys=xys.each_slice(2).to_a.sort

max = 0
0.upto(N-2) do |i|
    (i+1).upto(N-1) do |j|
        p = xys[j][0] - xys[i][0]
        q = xys[j][1] - xys[i][1]
        x1,y1 = xys[j]
        count = 1
        xys[j+1..-1].each do |x2,y2|
            if x1+p == x2 && y1+q == y2
                count += 1
            end
            x1,y1 = x2,y2
        end
        max = count if max < count
    end
end

puts N-max