5. There are 200 different cards with numbers $2,3,2^{2}, 3^{2}, \ldots, 2^{100}, 3^{100}$ (each card has exactly one number, and each number appears exactly once). In how many ways can 2 cards be chosen so that the product of the numbers on the chosen cards is a cube of an integer?
Answer: 4389.

Solution. To obtain the cube of a natural number, it is necessary and sufficient for each factor to enter the prime factorization of the number in a power that is a multiple of 3.

Suppose two cards with powers of two are chosen. We have 33 exponents divisible by 3 $(3,6,9, \ldots, 99)$, 34 exponents giving a remainder of 1 when divided by 3 $(1,4,7, \ldots, 100)$, and 33 exponents giving a remainder of 2 when divided by 3 $(2,5,8, \ldots, 98)$. We need the sum of the exponents to be a multiple of 3. For the sum of two natural numbers to be divisible by 3, we can either choose two numbers divisible by 3 $\left(C_{33}^{2}=\frac{33 \cdot 32}{2}=528\right.$ ways $)$, or take one number giving a remainder of 1 when divided by 3 and one number giving a remainder of 2 when divided by 3 $(34 \cdot 33=1122$ ways). We get $528+1122=1650$ ways.

The number of ways when the exponents on both chosen cards are powers of three is exactly the same, i.e., 1650.

If one card with a power of two and one card with a power of three are taken, then both exponents must be divisible by 3 - we get $33 \cdot 33=1089$ ways.

In total: $1650+1650+1089=4389$ ways.