P4213 [Template] Du Jiao Sieve

Description

Given a positive integer $n$, compute $$ans_1=\sum_{i=1}^n\varphi(i)$$ $$ans_2=\sum_{i=1}^n \mu(i)$$

Input Format

**This problem contains multiple test cases within a single test file.** The first line contains an integer, denoting the number of test cases $T$. Then $T$ lines follow, each containing an integer $n$, representing one query.

Output Format

For each query, output two integers in one line, representing $ans_1$ and $ans_2$.

Explanation/Hint

#### Constraints For all test cases, it is guaranteed that $1 \leq T \leq 10$, $1 \leq n \lt 2^{31}$. Translated by ChatGPT 5