Power of Largest Prime
Medium Accuracy: 14.38% Submissions: 2650 Points: 4

You are given a number 'n'. Your task is to check whether the power of its largest prime factor is greater than one or not.
Print "YES" if the power is greater than one otherwise print "NO";

Input :
First line contain 'T', number of test cases. T lines follow. Each line contains the number n.

Output :
Print the required answer for each test case in a separate line.

Constraints :
1 <= T <= 30
1 <= n <= 1018

Example :
Input :
3
36
100
13

Output :
YES
YES
NO

Explanation:
Testcase 1: 36 = 2*2*3*3 largest prime factor is 3. Its power is greater than 1.
Testcase 2: 100=2*2*5*5 largest prime factor is 5. Its power is greater than 1.
Testcase 3: 13=1*13 largest prime factor is 13. Its power is not greater than 1.

to report an issue on this page.

Editorial

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

Yes

All Submissions

My Submissions:

Login to access your submissions.