Find all integers $n$ satisfying the following property. There exist nonempty finite integer sets $A$ and $B$ such that for any integer $m$, exactly one of these three statements below is true:
(a) There is $a \in A$ such that $m \equiv a \pmod n$,
(b) There is $b \in B$ such that $m \equiv b \pmod n$, and
(c) There are $a \in A$ and $b \in B$ such that $m \equiv a + b \pmod n$.
We claim that all $n$ except $1,2,4$ work.
Equivalently, $A,B,A+B$ (as sets of residues modulo $n$) form a disjoint partition of $\mathbb{Z}/n\mathbb{Z}$.
For odd $n=2k+1$, we can take the construction $A=\{1\}, B=\{2,4,6,\dots,2k\}, A+B=\{3,5,7,\dots,2k-1,0\}$.
If we have a contruction for $n$, we get a construction for $2n$, by choosing $\widetilde{A}=A \cup (A+n), \widetilde{B}=B \cup (B+n)$.
So we get a construction for all $n$ which are not a power of $2$.
For $n=8$, we can take $A=\{1,2\}$ and $B=\{3,6\}$ so that $A+B=\{4,5,7,8\}$.
So it suffices to prove that there is no solution for $n=4$.
But if $\vert A\vert=\vert B\vert=1$, then $\vert A+B\vert=1$ which is too small.
Otherwise, if $\vert A\vert \ge 2$, then $\vert A+B\vert \ge 2$ which is too large.