class Ball
    attr_reader :id, :x, :y

    def initialize(id, x, y)
        @id = id
        @x = x
        @y = y
    end
end

n = gets.chomp!.to_i

balls = n.times.map {|i|
  x, y = gets.chomp!.split(" ").map!(&:to_i)
  Ball.new(i, x, y) 
}

diff2 = {}
diff = {}

balls.permutation(2).each do |ball1, ball2|
  diff_x = ball1.x - ball2.x
  diff_y = ball1.y - ball2.y
  key = "#{diff_x},#{diff_y}"
  diff[key] = (diff[key] || 0) + 1
  diff2[key] = (diff2[key] || {})
  diff2[key][ball1.id] = ball1.id
end

#require 'pp'
#pp diff2

count = diff2.inject(0) {|m, (_, v)| m = (v.count > m) ? v.count : m } 
count2 = diff.inject(0) {|m, (_, v)| m = (v > m) ? v : m } 

puts n - count2
