The numbers 111,333,666,101010,151515,212121,282828,363636,454545 and ti=12i(i+1)t_i=\frac{1}{2}i(i+1)ti=21i(i+1), are called half-consecutive.
For given NNN, find the smallest rrr which is no smaller than NNN such that trt_rtr is square.
Input Format
The input contains multiple test cases.
The first line of a multiple input is an integer TTT followed by TTT input lines.
Each line contains an integer N (1≤N≤1016)N~(1\le N\le 10^{16})N (1≤N≤1016).
Output Format
For each test case, output the case number first.
Then for given NNN, output the smallest rrr.
If this half-consecutive number does not exist, output −1-1−1.
样例输入
4 1 2 9 50
样例输出
Case #1: 1 Case #2: 8 Case #3: 49 Case #4: 288
找规律