Problem

Source: 2018 Canadian Mathematical Olympiad - P3

Tags: number theory, graph theory



Two positive integers $a$ and $b$ are prime-related if $a = pb$ or $b = pa$ for some prime $p$. Find all positive integers $n$, such that $n$ has at least three divisors, and all the divisors can be arranged without repetition in a circle so that any two adjacent divisors are prime-related. Note that $1$ and $n$ are included as divisors.