Problem

Source: Czech-Polish-Slovak Junior Match 2016, individual p3 CPSJ

Tags: combinatorial geometry, combinatorics, divides, geometry, 3D geometry, prism



Find all integers $n \ge 3$ with the following property: it is possible to assign pairwise different positive integers to the vertices of an $n$-gonal prism in such a way that vertices with labels $a$ and $b$ are connected by an edge if and only if $a | b$ or $b | a$. Poland