A new website registered $2000$ people. Each of them invited $1000$ other registered people to be their friends. Two people are considered to be friends if and only if they have invited each other. What is the minimum number of pairs of friends on this website?

Let's think step by step and output the final answer within \boxed{}.
user