For $n$ positive integers $a_1,...,a_n$ consider all their pairwise products $a_ia_j$, $1 \le i < j \le n$. Let $N$ be the number of those products which are the cubes of positive integers.
Find the maximal possible value of $N$ if it is known that none of $a_j$ is a cube of an integer.

(S. Mazanik)
1. **Understanding the Problem:**
   We are given \( n \) positive integers \( a_1, a_2, \ldots, a_n \) and we need to find the maximum number \( N \) of pairwise products \( a_i a_j \) (where \( 1 \leq i < j \leq n \)) that are cubes of positive integers. Additionally, none of the \( a_j \) is a cube of an integer.

2. **Prime Factorization Insight:**
   Each \( a_i \) can be expressed in terms of its prime factorization:
   \[
   a_i = p_1^{e_{i1}} p_2^{e_{i2}} \cdots p_k^{e_{ik}}
   \]
   For \( a_i a_j \) to be a cube, the exponents in the prime factorization of \( a_i a_j \) must all be multiples of 3. This means that for each prime \( p \), the sum of the exponents \( e_{ip} + e_{jp} \) must be divisible by 3.

3. **Reduction to Modulo 3:**
   Since none of the \( a_j \) is a cube, the exponents \( e_{ij} \) modulo 3 can only be 1 or 2. We can ignore primes with exponents that are multiples of 3 because they do not affect the cube condition.

4. **Optimal Construction:**
   To maximize \( N \), we need to balance the number of exponents that are 1 modulo 3 and 2 modulo 3. Let's denote:
   - \( x \) as the number of \( a_i \) with exponents \( \equiv 1 \mod 3 \)
   - \( y \) as the number of \( a_i \) with exponents \( \equiv 2 \mod 3 \)

   The total number of pairwise products that are cubes is given by:
   \[
   N = xy
   \]

5. **Maximizing \( N \):**
   To maximize \( N \), we need to balance \( x \) and \( y \). The maximum product \( xy \) occurs when \( x \) and \( y \) are as close as possible. Given \( x + y = n \), the maximum value of \( xy \) is achieved when \( x \approx y \approx \frac{n}{2} \).

6. **Calculating the Maximum Value:**
   The maximum value of \( xy \) is:
   \[
   N_{\text{max}} = \left\lfloor \frac{n}{2} \right\rfloor \left\lceil \frac{n}{2} \right\rceil
   \]
   This simplifies to:
   \[
   N_{\text{max}} = \left\lfloor \frac{n^2}{4} \right\rfloor
   \]

7. **Conclusion:**
   The maximal possible value of \( N \) is \( \left\lfloor \frac{n^2}{4} \right\rfloor \).

The final answer is \( \boxed{ \left\lfloor \frac{n^2}{4} \right\rfloor } \)