题目描述
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".
Example 1:
Input: n = 36
Output: YES
Explaination: The largest prime which divides
36 is 3. And it has power = 2 (223*3)
Example 2:
Input: n = 13
Output: NO
Explaintion: The largest prime which divides
13 is 13 itself.
Your Task:
You do not need to read input or print anything. Your task is to complete the function largePrime() which takes n as input parameter and returns 1 if the largest prime which divides n has power greater than 1, else, returns 0.
Expected Time Complexity: O(log(n))
Expected Auxiliary Space: O(1)
Constraints:
1 ≤ n ≤ 10^{18}
输入格式
见题面
输出格式
见题面