**Hint.** If $a$ and $b$ are large enough, then $ab-a-b+1>\frac{ab}2$.
Indeed; the inequality is equivalent to $(a-2)(b-2)>2$, so it suffices that $a,b\geq3$ and $\\{a,b\\}\
eq\\{3,4\\}$.
> Prime powers are certainly solutions, as they don't have any pair of coprime divisors $>1$. Now suppose $n$ has two nontrivial coprime divisors whose product is $n$. By the above, there are two cases to consider: **Case 1:** at least one of them is $2$, which implies $n=2p^k$ for some odd prime $k$. We need $p^k-1\mid n$, so $p^k-1\mid2$ and hence $p^k=3$, so $n=6$. **Case 2:** $n=3\cdot4=12$. It's easy to check that this is a satisfies the property.
> **Summarizing:** $n=p^k$ for some prime $p$ and an integer $k\geq0$, or $n=6$ or $n=12$.