Find two subsets $A$, $B$ that satisfy intersection-closure relations. Problem: Let $(M,d)$ be a metric space where $A,B\subset M$. If $\overline X$ is the closure of $X$, find two sets $A$, $B$ that satisfy
$$ \overline A \cap B,\;\; A \cap \overline{B},\;\; \overline{A\cap B},\;\; \overline A \cap \overline B $$
are all different.
My solution: I've intuitively (I really don't know how) found that $A=\cup_{n\in\mathbb{N}^+}\{\frac{1}{n}\}\cup  (2,3)\cup \{4\}$, and $B=(3,4) \cup \{0\}$ are solutions to this problem, since $\overline A \cap B = \{0\}$, $ A \cap \overline B = \{4\}$, $\overline {A \cap B} = \emptyset$ and $\overline A \cap \overline  B = \{0,3,4\}$, but
is there a more elegant/simpler solution?. How do I find a solution analytically? Any hint?
Thanks in advance.
 A: Maybe a bit more elegant is the circle $M = \{(x,y) \in {\mathbb R}^2: x^2 + y^2 = 1\}$ with $A = \{(\cos(t),\sin(t): 0 \le t < \pi\}$, $B = -A = \{(\cos(t),\sin(t): \pi \le t < 2 \pi\}$.
$\overline{A} \cap B = \{(-1,0)\}$
$A \cap \overline{B} = \{(1,0)\}$
$\overline{A \cap B} = \emptyset$
$\overline{A} \cap \overline{B} = \{(-1,0),(1,0)\}$

A: Here’s how I might go about constructing an example in $\Bbb R$.
I’d begin by assuming that I’ll have $A\cap B=\varnothing$ and hence $\overline{A\cap B}=\varnothing$. Clearly $\overline A\cap B$ and $A\cap\overline B$ will be subsets of $\overline A\cap\overline B$, and I want them to be proper subsets. Thus, there must be some 
$$x\in\left(\overline A\cap\overline B\right)\setminus\left(\overline A\cap B\right)=\overline A\cap\left(\overline B\setminus B\right)$$ and similarly some
$$y\in\left(\overline A\setminus A\right)\cap\overline B\;.$$
There’s nothing here that obviously prevents me from having $x\in A$ and $y\in B$, so I try for an example in which $A$ and $B$ are disjoint, $A$ contains a limit point $x$ of $B$, and $B$ contains a limit point $y$ of $A$. A simple subset of $\Bbb R$ that has a limit point not in the set itself is $[0,1)$, so let’s try taking $A=[0,1)$ and $y=1\in B$. The only point of $A$ that is a limit point of $\Bbb R\setminus A$ is $0$, so I need to set $x=0$ and make that a limit point of $B$, which is easily done by letting $B=[-1,0)\cup\{1\}$.
Then $\overline{A\cap B}=\varnothing$, $\overline A\cap B=\{1\}$, $A\cap\overline B=\{0\}$, and $\overline A\cap\overline B=\{0,1\}$.
