"Why did it come to this? I finally met someone I love, and also gained a lifelong best friend. Two kinds of joy blend together, and this double joy brings endless more happiness. I was supposed to embrace a dreamlike happy life. But why... why has everything turned out like this?"
Given a positive integer $$$n$$$, consider all positive integers in the interval $$$[n, n^2]$$$.
A positive integer $$$k$$$ is defined as good if it meets both of the following requirements:
For the given $$$n$$$, you are required to:
The first line contains a positive integer $$$T$$$ $$$(1 \le T \le 5000)$$$, indicating the number of test cases. Each of the next $$$T$$$ lines contains a positive integer $$$n$$$ $$$(1 \le n \le 5000)$$$.
For each test case, output two lines. The first line contains a non-negative integer $$$c$$$, representing the number of good integers in $$$[n, n^2]$$$. The second line contains a positive integer $$$k \in [n, n^2]$$$ which is a good integer. If there are multiple answers, you may output any of them.
As a special case: if no good integer exists in $$$[n, n^2]$$$, output $$$0$$$ on the first line and $$$-1$$$ on the second line.
512345
1 1 1 3 2 5 2 11 4 13