Is the following statement true? (it is asked to be proved true)
If $f: D \to\mathbb R^n$, and for every closed balls $B$ in $\mathbb R^n$, pre-image of $f$ of $B$ is closed in $D$, then $f$ is continuous on $D$.
I know the analogue of the statement for the openness is true. Because of the fact that every open set is equivalent to the union of certain open balls. However, there is no theorem that any closed set can be written into intersection of closed balls. I am just confused.