5. In the coordinate plane, a point whose both coordinates are integers is called an integer point. We use $I$ to denote the set of all lines, $M$ to denote the set of lines passing through exactly one integer point, $N$ to denote the set of lines not passing through any integer point, and $P$ to denote the set of lines passing through infinitely many integer points. Then the number of correct statements among the following expressions:
(1) $M \cup N \bigcup P=I$;
(2) $M \neq \varnothing$;
(3) $N \neq \varnothing$;
(4) $P \neq \varnothing$
is
A. 1
B. 2
C. 3
D. 4
The set $M$ contains the line $y=\sqrt{2} x$, and the set $M$ also contains the lines $y=\sqrt{2} x+\sqrt{3}, y=\frac{1}{2}$. If the line $l$ passes through two integer points $(m, n),(s, t)$, then the equation of $l$ is $(m-s) y=(n-t) x+m t-n s$, so $l$ must pass through infinitely many integer points. Therefore, (1), (2), (3), (4) are all correct, so the answer is $D$.