Determine the number of integers $n$ between 1 and 1000 for which it is possible to create an $n \times n$ array of symbols, each of which is an $e$, $\pi$, or $i$, such that:
In each row and column, exactly one third of the symbols are of each type.
In each diagonal which has a number of symbols divisible by 3 (such as the one drawn), exactly one third of those symbols are of each type.