Notice that x is reported by all of it's previous places , formally : report(x)=x−1 , thus the maximum count of reports is on the last student which is n and the number of reports is n−1.
Complexity : O(1).
for _ in range(int(input())):
n=int(input())
print(n,n-1)