Is $\mathbb Q^n$ disconnected? there is a problem on topology.

Let $n &gt; 1$ and let $X = \{(p_1,p_2, \ldots , p_n)\mid p_i\text{ is rational}\}$. Show that $X$ is disconnected.

how to solve this problem.i am completely stuck out.
HINT: Consider the set $\{\langle p_1,p_2,\dots,p_n\rangle\in X:p_1&lt;\sqrt2\}$. Is it open? Closed?
If we take the line $Y=(\sqrt 2)Z + (\sqrt 3,\sqrt 3,\sqrt 3, \cdots  \text{n times})$ where $Y,Z\in  R^n$. then the line cut the space into two disjoint open sets.hence it is disconnected