Let $K$ be an imaginary quadratic field of discriminant $d_K$ and let $K(\sqrt{a})$ be a quadratic extension where $a \in \mathbb{Z}$. Then $K \subset K(\sqrt{a})$ is unramified if and only if $a$ can be choosen so that $a \mid d_K$ and $a \equiv 1 \mod{4}$.
Not sure how to approach this. Thanks in advance.
Hint: write $K = \mathbb{Q}(\sqrt{D})$ and $L = K(\sqrt{a})$. What are the three quadratic subfields of $L$, and which primes of $\mathbb{Q}$ ramify in each of them?