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

if N == 1
    puts 1
    exit
end

h = Hash.new(0)
xys.combination(2) do |(x1,y1),(x2,y2)|
    h[[x1-x2,y1-y2]] += 1
end

puts N-(h.values.max)