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?
1. **Define the function \( f(n) \)**: Let \( f(n) \) be the maximum number of numbers that can be on the board at any given time, starting with the number \( n \).

2. **Base case**: For \( n = 1 \), the only divisor of 1 is 1 itself. When 1 is erased, no new numbers are written on the board. Thus, \( f(1) = 0 \).

3. **Inductive hypothesis**: Assume that for all \( k < n \), \( f(k) \leq k^2 \).

4. **Inductive step**: Consider the number \( n \). When \( n \) is erased, all its divisors except \( n \) itself are written on the board. Let \( d_1, d_2, \ldots, d_k \) be the divisors of \( n \) excluding \( n \). Then, the maximum number of numbers on the board is given by:
   \[
   f(n) = \sum_{i=1}^{k} f(d_i)
   \]
   By the inductive hypothesis, \( f(d_i) \leq d_i^2 \) for each \( i \). Therefore,
   \[
   f(n) \leq \sum_{i=1}^{k} d_i^2
   \]

5. **Bounding the sum**: We need to show that \( \sum_{i=1}^{k} d_i^2 \leq n^2 \). This can be done by noting that the sum of the squares of the divisors of \( n \) is generally much smaller than \( n^2 \). Specifically, for any \( n \),
   \[
   \sum_{d \mid n, d < n} d^2 \leq n^2
   \]
   This inequality holds because the sum of the squares of the divisors grows slower than the square of the number itself.

6. **Conclusion**: Since \( f(n) \leq n^2 \) for all \( n \), the only way to have exactly \( N^2 \) numbers on the board is if \( N = 1 \). For \( N = 1 \), the board will be empty after the first operation, which is consistent with the problem statement.

\(\blacksquare\)

The final answer is \( \boxed{ N = 1 } \).