Function $f(n), n \in \mathbb N$, is defined as follows:
Let $\frac{(2n)!}{n!(n+1000)!} = \frac{A(n)}{B(n)}$ , where $A(n), B(n)$ are coprime positive integers; if $B(n) = 1$, then $f(n) = 1$; if $B(n) \neq 1$, then $f(n)$ is the largest prime factor of $B(n)$. Prove that the values of $f(n)$ are finite, and find the maximum value of $f(n).$