n = gets.to_i()
datas = []
n.times do
  datas << gets.split(" ").map{|ppi|ppi.to_i}
end

maxcnt = 1
dx = 0
dy = 0
for i in 0..n
  for ii in i..n
    dx = datas[ii][0] - datas[i][0]
    dy = datas[ii][1] - datas[i][1]
    if dx == 0 or dy == 0
      next
    end
    tmp = 1
    while datas.include?([datas[ii][0] + tmp * dx,datas[ii][1] + tmp * dy])
      tmp += 1
    end
    if tmp > maxcnt
      maxcnt = tmp
    end
  end
  dx = 0
  dy = 0
  
end

puts (n - maxcnt + 1).to_i