6. On the coordinate plane, points $A(0,0)$ and $B(1000,0)$ were marked, as well as points $C_{1}(1,1)$, $C_{2}(2,1), \ldots, C_{999}(999,1)$. Then all possible lines $A C_{i}$ and $B C_{i}(1 \leqslant i \leqslant 999)$ were drawn. How many integer-coordinate intersection points do all these lines have? (An integer-coordinate point is one where both coordinates are integers.)

(O. A. Pyayve)
Solution. Let $a_{n}$ and $b_{n}$ denote the lines passing through $A$ and $B$ respectively, as well as through a point on $l$ with an abscissa that is $n$ greater than the abscissa of $A$ (where $1 \leqslant n \leqslant 999$). The lines $a_{n}$ and $a_{m}$ for $n \neq m$ intersect at a non-integer point (between $A B$ and $l$). Finally, the lines $a_{n}$ and $b_{m}$ for $n \leqslant m$ intersect at a point at a distance $k$ from $A B$ such that $1000(k-1)=k(m-n)$ (it is an integer if and only if $k$ is an integer). Therefore, $k$ is a divisor of 1000, and conversely, for each divisor, the corresponding $m-n$ is an integer. For each of them, there are $\frac{1000}{k}-1$ suitable pairs $(n, m)$, so the answer is $1+2+4+8+5+10+20+40+25+50+100+200+125+$ $250+500+1000-16+2=2326$.

Criteria. 2 points - for the equation $1000(k-1)=k(m-n)$;

5 points - for the statement about $\frac{1000}{k}-1$ suitable pairs $(n, m)$ or something equivalent to it;

-1 point for a calculation error in the final step.