#P1768A. Greatest Convex
Greatest Convex
Description
You are given an integer . Find the largest integer , where , such that is a multiple of , or determine that no such exists.
denotes the factorial of , which is defined recursively as for with the base case of . For example, .
If and are integers, then is a multiple of if there exists an integer such that . For example, is a multiple of but is not a multiple of .
The first line contains a single integer () — the number of test cases. The description of test cases follows.
The only line of each test case contains a single integer ().
For each test case output a single integer — the largest possible integer that satisfies the conditions above.
If no such exists, output .
Input
The first line contains a single integer () — the number of test cases. The description of test cases follows.
The only line of each test case contains a single integer ().
Output
For each test case output a single integer — the largest possible integer that satisfies the conditions above.
If no such exists, output .
Note
In the first test case, , which is a multiple of .
In the third test case, , which is a multiple of .