I want to find two closed subsets $A$ and $B$ of $\mathbb{R}$ (with subset topology), with the property that there exist two continuous bijections
$$f:A\to B,~~~~g:B\to A.$$

Clearly $A$ or $B$ cannot be bounded. But I didn't find more restrictions. Do we have some results on this question?