Here is a stronger version.

Note: This is what made the Pigeonhole Principle famous.

This is a hard proof because there is much going on. I will not mention each detail which needs to be mentioned because I do not have enough space. See if you figure it out from there.

It is interesting that the existence of solutions to the Pellian equation depends on diophantine approximation. Both the classic version by Euler/Lagrange, and the more modern version by Dirichlet. I happen to like the Euler/Lagrange approach more because they actually provide an algorithm with continued fractions. Unlike, Dirichlet, who just provides existence. But anyway, both proofs are complicated if you happen to learn them.