def main(argv)
  n = gets.chomp.to_i
  
  x = [0] * n
  y = [0] * n
  n.times do |i|
    (x[i], y[i]) = gets.chomp.split(' ').map(&:to_i)
  end
  
  table = [nil] * n
  n.times do |i|
	table[i] = [nil] * n
	
    n.times do |j|
      next if i == j
      
			table[i][j] = [i, j]
      
      px = x[j] - x[i]
      py = y[j] - y[i]
      
      n.times do |k|
        next if (i == k) || (j == k)
        
        qx = x[k] - x[i]
        qy = y[k] - y[i]
        
        if px * qy == qx * py then
          table[i][j].push(k)
        end
      end
    end
  end
  
	max1_index = [-1, -1]
	max1_array = []
	max2_index = [-1, -1]
	max2_array = []
	
	n.times do |i|
		n.times do |j|
			next if i == j
			next if table[i][j] == nil
			
			if max1_array.size < table[i][j].size then
				max1_array = table[i][j].dup
				max1_index = [i, j]
			end
		end
	end
	
	n.times do |i|
		n.times do |j|
			next if i == j
			next if table[i][j] == nil
			
			a = max1_array & table[i][j]
			if max2_array.size < (table[i][j].size - a.size) then
				max2_array = table[i][j].dup
				max2_index = [i, j]
			end
		end
	end
	
	puts ((n - (max1_array | max2_array).size) + 1).to_s
end

if self.to_s == 'main' then
  main(ARGV)
end