Problem

Source: All Russian Olympiad 2017,Day2,grade 11,P7

Tags: number theory, algebra



There is number $N$ on the board. Every minute Ivan makes next operation: takes any number $a$ written on the board, erases it, then writes all divisors of $a$ except $a$( Can be same numbers on the board). After some time on the board there are $N^2$ numbers. For which $N$ is it possible?