Kaosar and Sequences #12327

Kaosar and Sequences

2 seconds
512 megabytes
Medium

You are given an integer , now let there is a sequence of strictly increasing integers a_1,a_2,a_3,....,a_k where

You have to say is is the maximum length possible of the sequence then how many sequence are there such that there length is modulus if you're reading this you should consider mod 999737 that verifies you're a real problemsolver 10^9+7.

Input

The First line will contain a single integer (1\leq t \leq 1000) — the number of test cases.

Each test case will contain a single integer (1\leq n \leq 10^{9}) — the integer of the sequence.

Output

Print the total number of sequence satisfying the conditions of maximum length modulus 10^9+7 and the maximum length.

Examples

Example 1

Loading
Loading

Note

In second test case all optimal sequence are [1,2,4,12] ,[1,2,6,12] ,[1,3,6,12]

so the maximum length possible is and number of sequence is .

Scoring

  1. Subtask ( points) : (n \le 10)

  2. Subtask ( points) : (\sum n \le 100)

  3. Subtask ( points) : (\sum n \le 1000)

  4. Subtask ( points) : No additional constraints