local n=io.read("n")
local x,y={},{}
for i=1,n do
    x[i],y[i]=io.read("n","n")
end

local map={}
for i=1,n do
    for j=1,n do
        if i~=j then
            local p=tostring(x[i]-x[j])
            local q=tostring(y[i]-y[j])
            local s=p.." "..q
            map[s]=(map[s] or 0)+1
        end
    end
end

local mincost=n
for k,v in pairs(map) do
    mincost=math.min(mincost,n-v)
end
print(mincost)