For a positive integer $m,$ let $f(m) = m^2 + m + 1$.  Find the largest positive integer $n$ such that
\[1000 f(1^2) f(2^2) \dotsm f(n^2) \ge f(1)^2 f(2)^2 \dotsm f(n)^2.\]
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
For a positive integer $m,$ let $f(m) = m^2 + m + 1$.  Find the largest positive integer $n$ such that
\[1000 f(1^2) f(2^2) \dotsm f(n^2) \ge f(1)^2 f(2)^2 \dotsm f(n)^2.\]
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

user
31
For a positive integer $m,$ let $f(m) = m^2 + m + 1$.  Find the largest positive integer $n$ such that
\[1000 f(1^2) f(2^2) \dotsm f(n^2) \ge f(1)^2 f(2)^2 \dotsm f(n)^2.\]
train