For this Question: Given a number N. Find whether the given number is a perfect cube.

Expected Time Complexity: O(log n)First line contains an integer N

Constraints
1 <= N <= 100000Print "YES" if x is a perfect cube otherwise print "NO".Sample Input:
8

Output:
YES

Sample Input:
7

Output:
NO, I have written this Solution Code: a=int(input())


def perfectCube(a):
    for i in range(2,int(a/2)):
        if a%i==0 and i*i*i==a:
            return "YES"
    return "NO" 
print(perfectCube(a)), In this Programming Language: Python, Now tell me if this Code is compilable or not?