class Ball
    attr_reader :id, :x, :y

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

class ZeroCostCounter
    def initialize
        @counter = {}
    end

    def inc(x, y)
        @counter["#{x},#{y}"] = (@counter["#{x},#{y}"] || 0) + 1
    end

    def max
        @counter.inject(0) {|m, (_, v)| m = (v > m) ? v : m }
    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) 
}

counter = ZeroCostCounter.new
balls.permutation(2).each do |ball1, ball2|
  diff_x = ball1.x - ball2.x
  diff_y = ball1.y - ball2.y
  counter.inc(diff_x, diff_y)
end

puts n - counter.max
