Minimum degree of prime#1905

Minimum degree of prime

6 seconds
128 megabytes
Medium

Given a positive integer (n > 1). Consider all distinct prime divisors of . Each of these primes appears in the prime factorization of to some degree. Find the smallest of these degrees.

Input

The first line contains the number of positive integers (t \leq 100\,000).Each of the next lines contains a positive integer . It is guaranteed that each number does not exceed 10^{18}.

Output

For each input positive integer , output the minimum degree of a prime number in the prime factorization of on a separate line.

Examples

Example 1

Loading
Loading