Given an integer $$$n$$$. Find the number of ordered triples of integers $$$(x, y, z)$$$ such that $$$1 \leq x, y, z \leq n$$$, and the product $$$x \cdot y \cdot z$$$ is a perfect square$$$^{\text{∗}}$$$.
$$$^{\text{∗}}$$$An integer is a perfect square if it is equal to the square of some integer.
Each test contains multiple test cases. The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 10^4$$$). The description of the test cases follows.
The only line of each test case contains one integer $$$n$$$ ($$$1 \leq n \leq 10^6$$$).
It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^6$$$.
For each test case, output one integer — the number of suitable triples of integers.
51234999990
14720141799145052
In the first test case, the only suitable triple is $$$(1, 1, 1)$$$.
In the second test case, the following triples are suitable: $$$(1, 1, 1)$$$, $$$(2, 2, 1)$$$, $$$(2, 1, 2)$$$, $$$(1, 2, 2)$$$.