Given a positive integer N, find if it can be expressed as x^{y} where y > 1 and x > 0 and x and y both are both integers.

Example 1:

Input:N = 8Output:1Explanation:8 can be expressedas 2^{3}.

Example 2:

Input:N = 7Output:0Explanation:7 can't be expressedint the form x^{y}.

Your Task:

You don't need to read input or print anything. Your task is to complete the function checkPower() which takes an integer N and returns 1 if possible else, 0.

Expected Time Complexity: O(sqrt(N)) Expected Auxiliary Space: O(1)