Let $\mathbf{R}$ be a ring with unit $1$.
Let $I, J$ be ideals of $\mathbf{R}$ such that $I \cap J = (a)$ and $I + J = (b)$, for some $a, b \in R$.
(Here, $(x)$ means the principal ideal generated by $x$.)
Does it follow that $I$ and $J$ are principal ideals?
In case it doesn't, what about the specific case in which $a=0$ and $b=1$ (so that $I \cap J = \{0\}$ and $I+J = R$)?